Archived

This topic is now archived and is closed to further replies.

Ragadast

C++ Books

Recommended Posts

What''s the best book you think that someone should buy to learn the basics and some intermediate level C++? or maybe i should say the best book for learning C++ (it''d be better if it''s a version done for VC++)? After learning the general programming with the help of that (of those) book(s) I''d jump into game programming with other books. I already know some of the basics, but it doesn''t matter. Thanx

Share this post


Link to post
Share on other sites
Some people like "Learning to Program in C++", some people like "Teach Yourself C++ in 21 Days", and some people just read "The C++ Master Reference."

Point is, go to a bookstore and browse through them. Recommendations will get you screwed. The only prerequisite is this: it MUST use the standard C++ libraries. That is, if you see something like this:

#include <iostream.h>

int main()
{
cout << "Hello, world!" << endl;
return 0;
}

, forget it. Instead, you should be on the lookout for this:

#include <iostream>
using namespace std;

int main()
{
cout << "Hello, world!" << endl;
return 0;
}

or possibly,

#include <iostream>

int main()
{
std::cout << "Hello, world!" << std::endl;
return 0;
}

. Whatever you do, avoid the first, and embrace either of the latter two. It will decide a large part of how correctly you learn the language.

Later,
ZE.

//email me.//zealouselixir software.//msdn.//n00biez.//
miscellaneous links

Share this post


Link to post
Share on other sites
What''s so bad abot the first one besides theres no comments.

Im reading Teach Yourself C++ in 21 Days and I think its a pretty good one considering Im new in c++.



Stick

Share this post


Link to post
Share on other sites
ANSI C++ standard library headers have NO extension. Therefore < iostream.h > is NOT compliant with the C++ standards.

< iostream.h > != < iostream>

/*=========================================*/
/* Chem0sh */
/* Lead Software Engineer & Tech Support */
/* http://www.eFaces.biz */
/*=========================================*/

Share this post


Link to post
Share on other sites
quote:
Original post by Stick
What''s so bad abot the first one besides theres no comments.

Im reading Teach Yourself C++ in 21 Days and I think its a pretty good one considering Im new in c++.



Stick


The first one is not standard, that is why it is incorrect. Basically, ZealousElixer is trying to say that you should not get a book that doesn''t teach according to Standard C++ (i.e. <iostream.h> instead of <iostream.h>. Also, another way to tell if it does or not is to look in the front cover and see if it was written after 1998.
Also, a word of warning to all you newbs out there: DO NOT BUY DUMMIES BOOKS!!!! They are horrible! I made the mistake of buying C++ for dummies, only to discover it is the worst C++ book ever! Luckily, the local library had a couple good C++ books.

------------------------------
BASIC programmers don''t die, they just GOSUB and don''t return.

Share this post


Link to post
Share on other sites
Well... I agree with the above poster about learning the STL and that you should go to a bookstore and flick through the main contenders yourself but IMHO the only way ''21 days'' should be mentioned in the context of book recommendations is "I do not recommend ''21 days'' except as a handy blunt instrument with which to batter Jesse Liberty (author) around."

Also, book recommendations can sometimes be trusted . For instance, I don''t see how I could go wrong in this instance recommending "Essential C++" or "Accelerated C++". These books are part of a series edited by Bjarne Strostroup, creator of C++, and written by some of the most prominent experts in the field including (former?) members of the ANSI C++ Standards Comittee. This series is the closest thing we have to ''The Official Guide to Learning C++''. Not to imply that they are overly technical either - if you want an overly technical book there is always "the C++ Programming Language" by Strostroup himself and if you just want one big meaty book with a lot in it you could try "C++ Primer". "Essential" and "Accelerated" are quite short - the idea being to get you started writing full programs quite quickly and, most importantly, with a sensible programming style but once you''ve read them you would want something like "Primer" to fill the gaps in your knowledge. Anyway you should still go to a bookshop and have a look for yourself but it helps to know what your options are.

-

Geocyte Has Committed Suicide.

Share this post


Link to post
Share on other sites