Jump to content
  • Advertisement
Sign in to follow this  
Lucky Ace Card

"C++ Programming for the Absolute Beginner" by Dirk Henkemans, Mark Lee. Is it good?

This topic is 4813 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I was gunna order this book, but then I started thinking... Of all the books I've seen being suggested here, I don't remember seeing this one. Is this one not a good pick to start learning C++ with or something? [Edited by - Lucky Ace Card on August 19, 2005 3:11:58 AM]

Share this post


Link to post
Share on other sites
Advertisement
I don't recommend it since it uses a lot of bad coding examples.
For instance using

cout << name.c_str();
when you could just use
cout << name;
where name is a string.
And anytime a the first program in a book starts with
int main(void)
it can only get worse.
I should also state that most of the functions throughout the book use
void function(void); which is valid to support old C code but
void function(); is preferred these days.

Since I'm currently going through book again other major snafu's I've come across include:
classes with no default constructors defined when a constructor that takes parameters is declared.

enum used in example games and not explained in book
main game loops like:
while(!player1.taketurn && player2.takturn)
{
}
etc...

The only good thing in the book is the cool sid meier's pirate clone game at the end but even that won't compile with latest directx sdk since it used older directx dxutil library stuff to load bitmaps.

[Edited by - daviangel on September 9, 2005 11:31:02 PM]

Share this post


Link to post
Share on other sites
Beginning C++ Game Programming
by Michael Dawson
is the only beginning c++ geared towards game that is on the ACCU "recommended" book list and I can personally say it is very good since I have a copy of the book too!

Share this post


Link to post
Share on other sites
I used that book to start laerning c++, as the above poster said the pirate clone game doesn't really work anymore as its directdraw based (really not worth the hassle now). There are a lot more modern books available now, so go for one of them, if you already have the book, or can get it very cheaply, then its still useful to learn, but be ready to buy a more modern one when you can.

Share this post


Link to post
Share on other sites
In the interest of fairness.

Quote:
Original post by daviangel
And anytime a the first program in a book starts with int main(void)it can only get worse.


This is perfectly valid.

Quote:

classes with no default constructors defined


There's no need to provide a default constructor when it is trivial or indeed unwanted.

As for a suggestion, Accelerated C++ is what I usually recommend.

Share this post


Link to post
Share on other sites
Quote:
Original post by xMcBaiNx
In the interest of fairness.

Quote:
Original post by daviangel
And anytime a the first program in a book starts with int main(void)it can only get worse.


This is perfectly valid.


yes, but there are certain ways the majority of people write code that books should conform to. Although this isn't that bad, let's say someone wrote:

int main(void)
{int i = 0;
etc...
return 0;}

that's valid too and not too hard to read, but i wouldn't buy a book if i saw that. int main(void) isn't bad, it's just not common, and i prefer books that show people how code is commonly written.

Quote:
Quote:

classes with no default constructors defined


There's no need to provide a default constructor when it is trivial or indeed unwanted.


yes, but IMO it's bad practice.

I haven't read the book, so I'm not really judging that. These are just my opinions.

Share this post


Link to post
Share on other sites
Some books write this in the begginning ,but later they tell you what to do so its not actually incorrect ,but I wouldn't conside it "good"

Share this post


Link to post
Share on other sites
Quote:
Original post by SpacedOut
Quote:
Original post by xMcBaiNx
In the interest of fairness.

Quote:
Original post by daviangel
And anytime a the first program in a book starts with int main(void)it can only get worse.


This is perfectly valid.


yes, but there are certain ways the majority of people write code that books should conform to. Although this isn't that bad, let's say someone wrote:


The standard stipulates that main has two possible signatures.


int main(void);
int main(int, char **);


Those are both correct and widely used. Why would you use the second one if you don't expect command line parameters ?



Quote:

Quote:
There's no need to provide a default constructor when it is trivial or indeed unwanted.

yes, but IMO it's bad practice.


It's GOOD practice. If your class has no ue for a default constructor, don't write one !

Case in point:


class Children {
Parent& _mother;
Parent& _father;

public:
Children(const Parent& father, const Parent& mother) : _mother(mother), _father(father) {}
}


A Child always have a mom and a dad, why would you want to provide a default constructor (assuming no other constraints force you to).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!