Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jun 13th, 2006, 8:15 PM   #1
Kilo
Expert Programmer
 
Kilo's Avatar
 
Join Date: Nov 2005
Location: In Pink Clam?
Posts: 542
Rep Power: 0 Kilo is an unknown quantity at this point
Send a message via AIM to Kilo
Initializer List?

Did i really miss this? How long has this been C++ standard?

// example constructor
D3D_Engine::D3D_Engine()
{
         int test1 = 0, test2 = 0;
}

//Initializer List
D3D_Engine::D3D_Engine()
         : test1(0), test2(0)
{
}
__________________
"When in Rome, Do as the Romans Do"
"Beauty is in the eye of the BEER holder"
"Save your breath your going to need it for your blow up doll later"

SearchLores.org
Kilo is offline   Reply With Quote
Old Jun 13th, 2006, 8:36 PM   #2
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
You just missed it, bub.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Jun 13th, 2006, 9:09 PM   #3
The Dark
Expert Programmer
 
Join Date: Jun 2005
Posts: 915
Rep Power: 4 The Dark is on a distinguished road
Also you need to take out the "int" if you meant them to be the same. Otherwise the first one is just declaring some unused variables.
The Dark is offline   Reply With Quote
Old Jun 14th, 2006, 6:31 AM   #4
grumpy
Programming Guru
 
grumpy's Avatar
 
Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,313
Rep Power: 5 grumpy will become famous soon enough
Initialiser lists predate any C++ standard (draft or otherwise). They date back at least as far as the ARM (the Annotated Reference Manual) which was published by Ellis and Stroustrup in 1990, and was one of the base documents for C++ standardisation process.
grumpy is offline   Reply With Quote
Old Jun 14th, 2006, 11:52 AM   #5
nnxion
Programming Guru
 
nnxion's Avatar
 
Join Date: Jun 2005
Location: elemental plane
Posts: 1,429
Rep Power: 5 nnxion is on a distinguished road
Quote:
Originally Posted by grumpy
Initialiser lists predate any C++ standard (draft or otherwise). They date back at least as far as the ARM (the Annotated Reference Manual) which was published by Ellis and Stroustrup in 1990, and was one of the base documents for C++ standardisation process.
1990, that's almost before Kilo was born. :p
__________________
"Employ your time in improving yourself by other men's writings, so that you shall gain easily what others have labored hard for."
-- Socrates
nnxion is offline   Reply With Quote
Old Jun 14th, 2006, 8:59 PM   #6
The Dark
Expert Programmer
 
Join Date: Jun 2005
Posts: 915
Rep Power: 4 The Dark is on a distinguished road
Thats probably why he missed the memo.
The Dark is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 5:05 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC