Source code from book not working!!!

Started by
10 comments, last by enderfults 16 years ago
Quote:Original post by korsen
Quote:Original post by daviangel
Do yourself a favor and get the Mike Dawson C++ book if you are new to C++ and just starting out.
I also tried learning C++ from that book before I knew any better and spent 1/2 my time trying to get the code in that book to compile.
It was written with VC++ 6 from what I remember so it doesn't even follow the new for loop scope rules.
I could go dig up my copy and look to see if I wrote down any notes on how to fix the errors but I'm eating right now.


I found these two books:
This is from 2004
http://www.amazon.com/Beginning-C%2B%2B-Game-Programming-Development/dp/1592002056/ref=sr_1_8?ie=UTF8&s=books&qid=1206334835&sr=1-8
This is from Dec 2005 (so basically 2006)
http://www.amazon.com/Microsoft-Express-Programming-Absolute-Beginner/dp/159200816X/ref=sr_1_2?ie=UTF8&s=books&qid=1206334983&sr=1-2

would either be a good pick? if not, does anyone have excellent suggestions for something that's not anymore dry than the sahara? i really liked this book till it started giving me trouble.

I noticed the book i'm using is from 2000 :(

Yup! the first one is good. It's the same Dawson book I mentioned above.
It covers all the C++ basics you'll need as a beginner and is not dry/dull/boring like 99% of other recommended books.

[Edited by - daviangel on March 24, 2008 11:42:32 PM]
[size="2"]Don't talk about writing games, don't write design docs, don't spend your time on web boards. Sit in your house write 20 games when you complete them you will either want to do it the rest of your life or not * Andre Lamothe
Advertisement
I just copied "test.cpp" into a new project and it compiled fine with Visual C++ 2008 Express Edition. I would recommend creating a completely new project and just using that file. Make sure you include <string> or cout wont understand how to print strings out to the console.

Sometimes books can be a little confusing about the changes made to the code. A lot of the time though, they include CDs with the code from the book on them. If there is one try to find the code he uses from this chapter. I would guess that he was trying to move the definition of Bow out of test.cpp into their own files to show you some organization techniques.
We will find a way or make one! -- Hannibal

This topic is closed to new replies.

Advertisement