Hey guys, I'm looking for THE BEST book to learn C++ that covers everything from the ground up.
About 12 years ago, I was really good at vb and touched on some c...so I have a background in programming and understand the basic mechanics of how programming languages work.
Eventually my goal is to work mainly on console applications (EDIT: I may have used the wrong term here, I dont think I mean console -- I mean applications with windows) like browsers, graphics editors (think photoshop, gimp, etc), and smaller tools as well.
--
Anyway, I've been following some tutorials online but I feel a GOOD book would be the way to go.
What is THE BEST book out there (sub $100 or so if possible), then also a GOOD reference book as well please.
Thanks!
EDT: I did check stickies, and the reason I don't want to search is that a lot of the things that come up seem old. I have a few books at my mother's house collecting dust that I grabbed but they are so out of date it's not funny.
There is no 'best'. There is no book to my (admittedly limited) knowledge that contains absolutely everything about c++, I'm sure you would need to read a lot of specifications to learn every last detail. With that said, http://www2.research.att.com/~bs/3rd.html from Bjarne Stroustrup, the guy who made the language. It's pretty comprehensive on a majority of the features of the language. From what everyone says, it's a book that falls in a 'should read' category.
hrmm it's from 2004. I realize that not much has changed since then (or ever) for the language as a whole...
But it seems that any of the older stuff that I read doesn't work like the author wanted it to.
Like #include <iostream.h>
I guess now the syntax is #include <iostream>
I've even seen some where it will say like #include "iostream.h"
--
I just get worried when I start following a tutorial and already there's something I need to research and fix before I can compile the program and have it work.
I'd recommend reading in the following order:
C++ Primer Plus
C++ Primer
Thinking in C++ (free on the internet)
The C++ Programming Language (the one referenced above)
Strangely the C++ Primer Plus is more of a primer than the C++ Primer, or so I've heard.
The C++ Primer Plus is written by different authors and has no relations to the C++ Primer. I'd leave it out and start with the C++ Primer. I'd also leave out "Thinking in C++" and skip straight to "The C++ Programming Language". Since you still have a lot of reading to do after that, I'd try to cut down on the books a bit.
hrmm it's from 2004.
1997, actually. But you shouldn't compare it to other books. Even though the first C++ standard wasn't official yet at that time, it's still easily the best book about C++ to date (and it's following the current standard from 1998, of course).
Would I be doing things totally backwards if I started with a book that dealt mainly with windows applications? Like forms, buttons, text boxes, messageboxes, etc etc.
I don't seem to have any interest in doing things in a console window with text on the screen...it just seems so primitive.
Would I be doing things totally backwards if I started with a book that dealt mainly with windows applications? Like forms, buttons, text boxes, messageboxes, etc etc.
Yes. In theory it would be okay if the book still taught proper C++ along that, but I don't know any such books and they might not even exist.
I don't seem to have any interest in doing things in a console window with text on the screen...it just seems so primitive.
You don't have to, you can take a look at SFML (2D graphics) or Qt (GUI) if you don't want to test your knowledge on console programs only.
@Athar, the C++ Primer goes into some rather advanced topics, and isn't really a "primer." C++ Primer Plus is much more beginner friendly so that's why I recommend it first :o
As for starting with Windows Applications, I wouldn't recommend it. Creating forms, buttons, text boxes etc. requires an additional library (like Qt or the MFC) and then you'll be spending more time learning the library then learning the core mechanics of C++. There's quite a bit of C++ involved to make a single button appear :o
Console Applications greatly simplify everything from variables through inheritance and the STL without having to worry about the ins and outs of proper GUI design and the likes.
@Athar, the C++ Primer goes into some rather advanced topics, and isn't really a "primer." C++ Primer Plus is much more beginner friendly so that's why I recommend it first :o
What you call "advanced topics" (I assume you mean iterators or something like that) are actually the basics of a modern, proper C++ style and therefore should be taught first.
and isn't really a "primer."
Rest assured that it is. It can even be used if you have no prior programming knowledge (although that doesn't apply to OP anyway).
hey guys there are two "The C++ Programming Language" books. one is the 3rd edition and the other is the special edition. which one are you refering to extactly?
Once you know what classes are, you should be able to see what's being done in that piece of code.
I don't think it's a bad idea to make the learning experience more fun by using something like SFML or Qt as an aid, especially if you plan to learn how to use them at some point anyway.
Once you know what classes are, you should be able to see what's being done in that piece of code.
My point in case. To fully understand classes and everything that comes before them (functions, references, arrays, pointers, dynamic memory, etc.), which is more than most beginners can say.
There's no need to fully understand classes and related topics just for playing around with Qt or SFML. You only need to know the bare basics, which are explained early on in the C++ Primer.
I think what I'm going to do is go through this older c++ book I have to really get a grip on the language and when I feel I've grasped enough of that I'm definitely going to look into Qt and SFML.
I covered a chapter tonight on pointers, and arrays and strings...I never knew how c and c++ handled strings, but I find it very interesting (compared to my experience in vb) and in many of ways will make some stuff a lot easier actually.
--
This Qt and SFML (excuse my ignorance) -- I'm assuming I can download these and use them in an IDE like eclipse or ms visual c++ 2010, etc.
Haha Athar didn't you just say that he should skip Thinking in C++ :o
As far as IDE's go, I recommend Visual Studio 2008, I find it runs faster than 2010. Otherwise most people seem to go for Code::Blocks, but I'm not a big fan of it. Another popular text-editor is vim, but you'll have to compile and link from a command line.