If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register or Login
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Re: How structs are initialized.

Then either it's a "C" book, or it's one of those that finds it convenient to treat structs and classes differently even though they're almost the same thing. I guarantee it'll talk about constructors when you get to classes....

Re: How structs are initialized.

The book is a C++ book. Although it does talk about constructor use in classes they are not mentioned in the "structured data" chapter which is where structs are introduced. I found it very weird that the book did not mention anything about setting "default" values for structs. So i had to ask about it.

Other than that there is afaik no differences between structs and classes.

Get Microsoft Visual C++ Express here or CodeBlocks here.
Get STLFilt here to radically improve error messages when using the STL.
Get these two can't live without C++ libraries, BOOST here and Loki here.
Check your code with the Comeau Compiler and FlexeLint for standards compliance and some subtle errors. Always use [code] code tags [/code] to make code legible and preserve indentation.Do not ask for help writing destructive software such as viruses, gamehacks, keyloggers and the suchlike.