| |
|
Welcome to KnowledgeSutra - Dear Guest | |
Best Books For Learning C++
#1
Posted 30 June 2010 - 05:28 AM
Right now I'm reading Principles and Practice using C++ by Bjarne Stroustrup (who is, as far as I know, the creator of C++).
It seems to be a pretty good book so far but I'm wondering where I should go from there (to go a little more in-depth.. I'm guessing intermediate level is where I'd want to go to).
Thanks guys!
#2
Posted 11 July 2010 - 02:08 AM
If you want to learn how to program games, I would recommend reading C++ Primer Plus 5th Edition and continuing your education with Windows Programming and DirectX 9 or 10 depending on your OS at http://www.directxtutorial.com/
#3
Posted 11 July 2010 - 05:17 AM
it is about 432 pages, the last edition was in may 2009,even its price is reasonable about i think.here is the link of the book, check it if you want.
http://www.dummies.c...escription.html
and this is the table of contents.
Quote
Chapter 1: Writing Your First C++ Program.
Chapter 2: Declaring Variables Constantly.
Chapter 3: Performing Mathematical Operations.
Chapter 4: Performing Logical Operations.
Chapter 5: Controlling Program Flow.
Part II: Becoming a Functional C++ Programmer.
Chapter 6: Creating Function.
Chapter 7: Storing Sequences in Arrays.
Chapter 8: Taking a First Look at C++ Pointers.
Chapter 9: Taking a Second Look at C++ Pointers.
Chapter 10: The C++ Preprocessor.
Part III: Introduction to Classes.
Chapter 11: Examining Object-Oriented Programming.
Chapter 12: Adding Class to C++.
Chapter 13: Point and Stare at Objects.
Chapter 14: Protecting Members: Do Not Disturb.
Chapter 15: Why Do You Build Me Up, Just to Tear Me Down Baby?
Chapter 16: Making Constructive Arguments.
Chapter 17: Copying the Copy Copy Copy Constructor.
Chapter 18: Static Members: Can Fabric Softener Help?
Part IV: Inheritance.
Chapter 19: Inheriting a Class.
Chapter 20: Examining Virtual Member Functions: Are They for Real?
Chapter 21: Factoring Classes.
Part V: Optional Features.
Chapter 22: A New Assignment Operator, Should You Decide to Accept It.
Chapter 23: Using Stream I/O.
Chapter 24: Handling Errors — Exceptions.
Chapter 25: Inheriting Multiple Inheritance.
Chapter 26: Tempting C++ Templates.
Chapter 27: Standardizing on the Standard Template Library.
Part VI: The Part of Tens.
Chapter 28: Ten Ways to Avoid Adding Bugs to Your Program.
Chapter 29: Ten Major Recent Additions to C++.
#4
Posted 11 July 2010 - 05:20 AM
If i've to suggest someone C++ books, my suggestion will be :
1. Absolute C++
2. Object oriented programming -Robert lafore
3. C++ primer
Many people on stackoverflow and other forums suggest bruce eckel but i digress. I think for newbies and intermediate people it's not the book. You'll find yourself into more conflicts if you try bruce eckel's books. Avoid "In easy steps" and "For dummies" books as they're band-aid and cut-paste approach books. Herbt schildt is also overrated and rarely you'll find content in the books of herbt schildt so i suggest you should avoid his books.
#5
Posted 11 July 2010 - 09:32 AM
#6
Posted 11 July 2010 - 03:47 PM
ArcticCode, on 11 July 2010 - 02:08 AM, said:
If you want to learn how to program games, I would recommend reading C++ Primer Plus 5th Edition and continuing your education with Windows Programming and DirectX 9 or 10 depending on your OS at http://www.directxtutorial.com/
Would the primer books not be more geared towards people who already fully understand the material? I thought it would skip a lot of steps and just go over random basics to help reinforce a few important things.
I've actually ran into a few books like that before and all they did is leave me more confused than before.
web_designer, on 11 July 2010 - 05:17 AM, said:
it is about 432 pages, the last edition was in may 2009,even its price is reasonable about i think.here is the link of the book, check it if you want.
http://www.dummies.c...escription.html
and this is the table of contents.
These are good books for basics; I've started the C++ one already. The issue is they don't spend enough time on real-world programming. It's more or less "here's how to to x," "now here's how to do xx." They don't go through, for example, "For a banking application, you would need to use this thought process and work towards..." or anything like that.
Real world experience counts for more than anything else.
mahesh2k, on 11 July 2010 - 05:20 AM, said:
If i've to suggest someone C++ books, my suggestion will be :
1. Absolute C++
2. Object oriented programming -Robert lafore
3. C++ primer
Many people on stackoverflow and other forums suggest bruce eckel but i digress. I think for newbies and intermediate people it's not the book. You'll find yourself into more conflicts if you try bruce eckel's books. Avoid "In easy steps" and "For dummies" books as they're band-aid and cut-paste approach books. Herbt schildt is also overrated and rarely you'll find content in the books of herbt schildt so i suggest you should avoid his books.
This one I've never heard of. I'll definitely check it out and see where it takes me.
The Simpleton, on 11 July 2010 - 09:32 AM, said:
Do you mean C++ or Visual C++? I have a Visual C++ The Complete Reference book, but it got me nowhere. It spent more time on drawing boxes using C++ than anything -- I'd much rather just make a cube and load it in via DirectX, lol.
Thanks for the information though guys. I'm not putting down your ideas or anything, just explaining the issues I've had with the different books listed (if any).
#7
Posted 12 July 2010 - 02:53 AM
rpgsearcherz, on 11 July 2010 - 03:47 PM, said:
I definitely meant the C++ book, not Visual C++ And there's much less of box-drawing in this one
#8
Posted 12 July 2010 - 05:44 PM
I say, when you've read one book, you've got to move on to working with some source code. Sure, reading a second book might give you the concepts that you may have missed with book one, but you do not benefit as much as you could have with the same amount of time.
Visual C++ books are different from plan old C++ books. Visual C++ books aim at targeting their readers into Windows programmers. You would find yourself working with the message loop, dealing with handles, making Win32 API calls, and stuff of the sort - instead, a regular C++ book tells you about classes, inheritance, the standard template library, operator precedence, and pointers.
If you do feel like you've hit a glass ceiling when reading books, you ought to take the leap into open-source code. There are lots of open source projects out there and there's tons of code for you to sift through. In the process, you might even be able to resolve a couple of tickets and lend the open-source community a helping hand. It always starts with the first step and then, before you know it, you're a full-fledged open-source advocate and developer. The Linux source code is one place where you can look up C code. Notepad++ is a Visual C++ based text editor.
#9
Posted 12 July 2010 - 09:57 PM
k_nitin_r, on 12 July 2010 - 05:44 PM, said:
I say, when you've read one book, you've got to move on to working with some source code. Sure, reading a second book might give you the concepts that you may have missed with book one, but you do not benefit as much as you could have with the same amount of time.
Visual C++ books are different from plan old C++ books. Visual C++ books aim at targeting their readers into Windows programmers. You would find yourself working with the message loop, dealing with handles, making Win32 API calls, and stuff of the sort - instead, a regular C++ book tells you about classes, inheritance, the standard template library, operator precedence, and pointers.
If you do feel like you've hit a glass ceiling when reading books, you ought to take the leap into open-source code. There are lots of open source projects out there and there's tons of code for you to sift through. In the process, you might even be able to resolve a couple of tickets and lend the open-source community a helping hand. It always starts with the first step and then, before you know it, you're a full-fledged open-source advocate and developer. The Linux source code is one place where you can look up C code. Notepad++ is a Visual C++ based text editor.
Thanks for that information. I'll definitely take it into consideration. Never really thought of using open source as a way to learn -- I was planning to move on into it once I felt like I had a solid understanding though.
I do have a compiler already (I'm a student so I get Visual Studio 2010 Professional for free).
You brought up the C++ vs Visual C++ thing and I'm a little lost on it. Wouldn't all books be more geared towards Windows programming by default? I've heard most things will work cross-platform (such as both Windows and Linux) but there are a lot of commands that won't (for example, system("pause"); won't work on Linux).
It seems most games and things like that are made by Visual C++ these days rather than just normal C++, so would you still suggest learning C++ before moving up?
There's just sooo much knowledge and soo much to learn still, it's a little overwhelming. It's kind of hard to really wrap your mind around the vast amount of stuff there is and figure out your direction.
#10
Posted 13 July 2010 - 01:08 AM
rpgsearcherz, on 11 July 2010 - 03:47 PM, said:
I've actually ran into a few books like that before and all they did is leave me more confused than before.
Not at all. I started reading the book with absolutely no programming experience whatsoever. I had no idea what a compiler was, source code, etc. As long as you don't tend to skim books like I do sometimes (accidentally), you should have no problem picking up the concepts. I recommend that you should manually enter each and every one of the examples into your compiler and compile it yourself. After that, you should try changing some lines and see what it does.
Quote
C++ and Visual C++ is no different from each other. Visual C++ is referring to the Microsoft Visual C++ Compiler. Books shouldn't be all geared towards Windows programming because it would be harder to teach C++ like that. Instead, the books teach you concepts through console programs (the little programs that run under the command prompt). Windows programs are large and complex by nature (few hundred lines of code) so it would be difficult to teach C++ with 80% of the book containing code. After mastering all the basics of C++ through console programming, you can move on to Win32 (Windows) programming which you could easily adapt to by putting it all together.
Some code is cross-platform. If your code can be compiled on different operating systems and machines without error, your code is considered "portable". You may want to put some research into which headers and functions are portable and which aren't. As for system("pause"); or system("ANYTHING"), you should avoid this line because it isn't portable and it sometimes triggers the antivirus. It is also a heavy function. What it does is halt the program for a bit, go to the operating system, do all this stuff, exit OS, and return to program. I would assume that you use this line to keep the console window open. You should use cin.get(); at the end of your code (once or twice depending how the compiler you are using compiles code). All this does is wait for you to press the RETURN key.
I agree that this is a lot of knowledge but if you can use it in your program, it can be really fun. Also, the reason a lot of games are programmed and compiled in Visual C++ is because the compiler is amazing. There are many options on the compilation, linking, etc.
I forgot to mention another book that is free for download from the MSDN website called C++ Beginner's Guide by Herbert Schildt. He is a pretty well known programmer author who writes books on Java, C#, and other languages. I thought that the book was a much less intimidating book to read. It is an ebook and can be found here: http://msdn.microsof...r/cc305129.aspx
I wish you luck in your programming. Maybe you'll come up with something promising in the future
Reply to this topic

1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users















