Ok first my rant about this book...
I just went through Beginning C++ Game Programming by Michael Dawson and MAN does the book suck!! It introduces some good topics when it comes to object oriented programming but it fails to explain how some of the operators work. For example:
friend ostream& operator<<(ostream& os, const Card& aCard);
I know I am overloading the operator but how? What does this do? WTF is ostream&? wtf does everything inside the parenthases mean? I am about to graduate as an undergrad CS major and I am VERY proficient in Java as well as most web-based languages. I figured this book would be a fun introduction to C++ for me and I could make some games to boot but no. I know know what to write if I want to do exactly what's in the book but I don't know what any of it means or how the heck it works.
Furthermore, he doesn't even include all the code in the book!! There is a "companion" CD-Rom that includes all the code which is nice, but what he does is tells you to read the book then compile the code on the CD. How is anyone supposed to learn like that honestly? I could look through the code but it's up to me to figure out what the 30% that he didn't explain in the book means. Sometimes it's easy to figure out but for the most part it's important things like includes, namespaces, datastructures etc. Of course I know what a vector is but what if I didn't? WTF is Clear();? What's included in <Algorithms> and why did you use it?
Anyways, if you know C++ you don't need the book cause it doesn't even cover a 1st semester programming class worth of information. If you don't know C++ you will be left thinking WTF?....
Does anyone have a good suggestion for learning C++? I am really interrested in the networking and GUI parts the most though I know I need to learn the basics first. I know almost all the datastructures I have encountered thus far and the algorithms won't be a huge deal. What I need to know is why the heck you put the & symbol after something, I googled the * and realized it was a pointer thank God. Also, in Java the for loop format is:
for (int i=0; i<10; i++)
but in C++ it's:
for (int i=0; i<10; ++i)
It's a subtle and rather unimportant difference I know, but it's important to know when the "i++ or ++i" part is executed. In Java it's executed at the very end. I know this is a basic example and I could figure it out playing with it and I did, but it's just an indicator of a larger problem with the book as a whole. Alot of important parts were not explored such as when variables bind, etc.
Anyways, it would be great if someone could suggest a good book. I could probably get away with just a reference guide so I can look it all up myself but I plan on doing this at my summer internship when I have some down time so it's alot easier to bookmark a page than create design documents myself, plus I'm certain I'll miss things I need later. Thanks in advance.
I just went through Beginning C++ Game Programming by Michael Dawson and MAN does the book suck!! It introduces some good topics when it comes to object oriented programming but it fails to explain how some of the operators work. For example:
friend ostream& operator<<(ostream& os, const Card& aCard);
I know I am overloading the operator but how? What does this do? WTF is ostream&? wtf does everything inside the parenthases mean? I am about to graduate as an undergrad CS major and I am VERY proficient in Java as well as most web-based languages. I figured this book would be a fun introduction to C++ for me and I could make some games to boot but no. I know know what to write if I want to do exactly what's in the book but I don't know what any of it means or how the heck it works.
Furthermore, he doesn't even include all the code in the book!! There is a "companion" CD-Rom that includes all the code which is nice, but what he does is tells you to read the book then compile the code on the CD. How is anyone supposed to learn like that honestly? I could look through the code but it's up to me to figure out what the 30% that he didn't explain in the book means. Sometimes it's easy to figure out but for the most part it's important things like includes, namespaces, datastructures etc. Of course I know what a vector is but what if I didn't? WTF is Clear();? What's included in <Algorithms> and why did you use it?
Anyways, if you know C++ you don't need the book cause it doesn't even cover a 1st semester programming class worth of information. If you don't know C++ you will be left thinking WTF?....
Does anyone have a good suggestion for learning C++? I am really interrested in the networking and GUI parts the most though I know I need to learn the basics first. I know almost all the datastructures I have encountered thus far and the algorithms won't be a huge deal. What I need to know is why the heck you put the & symbol after something, I googled the * and realized it was a pointer thank God. Also, in Java the for loop format is:
for (int i=0; i<10; i++)
but in C++ it's:
for (int i=0; i<10; ++i)
It's a subtle and rather unimportant difference I know, but it's important to know when the "i++ or ++i" part is executed. In Java it's executed at the very end. I know this is a basic example and I could figure it out playing with it and I did, but it's just an indicator of a larger problem with the book as a whole. Alot of important parts were not explored such as when variables bind, etc.
Anyways, it would be great if someone could suggest a good book. I could probably get away with just a reference guide so I can look it all up myself but I plan on doing this at my summer internship when I have some down time so it's alot easier to bookmark a page than create design documents myself, plus I'm certain I'll miss things I need later. Thanks in advance.