![]() |
|
This thread is locked; no one can reply to it.
![]() ![]() |
1
2
|
Learning C++ |
gnolam
Member #2,030
March 2002
![]() |
As an attempt to get back my motivation, I thought I'd broaden my horizons a bit. I think I've learned as much C as I'm ever going to, so I thought I'd join the dark side and learn the evil that is C++ Most tutorials and books I have glanced at seem to fall into one of two categories:
</li> So... do you guys know any good resources for learning C++? Preferrably from a C perspective. -- |
spellcaster
Member #1,493
September 2001
![]() |
There's not much to know, really. From the language point of view, that is. Next step would be templates. That's it. All the other stuff explains how to usee C++, as in "OOP with C++". What I'd suggest is that you read the C++ FAQs and then get the "Design Patterns" book. The C++ FAQ should answer most questions, and with the FAQ next to you, you should be able to switch from C to C++. -- |
Kris Allen
Member #4,639
May 2004
![]() |
I can tell you a book not to get: SAMS Learn C++ in 21 days. Absolute crap... when they're not teaching you to use "std::cout" when just "cout" is fine (that's what "using namespace whatever" is for, after all), they're shoving 200-line examples down your neck that just bore you. They say anything by O'Reilly is good, I'm sure they've got a C++ book in shops - Kris |
Myrdos
Member #1,772
December 2001
|
I might be tempted to start using#include <string>instead of#include <string.h> A good reference for strings, vectors and other useful C++ classes: Also, next step would be to try using #include <iostream> instead of #include <stdio.h> A good reference for I/O: I think you'll find that these simple changes will, IMO, make your code more readable and give a basic idea of how C++ classes work. __________________________________________________ |
Evert
Member #794
November 2000
![]() |
Quote: I can tell you a book not to get: SAMS Learn C++ in 21 days.
Well, the title is a giveaway I've heard mixed things about Stroustrup's book on C++: some people like it, some people say it's horrible. I have no real opinion on it, never having read the book. My only reference for C++ are the two or three paragraphs at the end of my C book, which is rather dated. |
Gideon Weems
Member #3,925
October 2003
|
I must have at least a dozen C++ books, and the best one is entitled The C++ Black Book, published by Corollis. But, c'mon! You've got the best forum in the world to help you out--books schmooks. (Besides, I don't quite understand the big deal people try to make between C/C++. They're the same language.) |
HoHo
Member #4,534
April 2004
![]() |
Why haven't anyone suggested Bruce Eckel's books? Thats how I learnt c/c++. __________ |
Rash
Member #2,374
May 2002
![]() |
Stroustrup's book is meant as a reference guide. There's the often-heard advice for existing programmers to get "Accelerated C++" by Koenig and Moo. |
X-G
Member #856
December 2000
![]() |
The one I read a few years ago was Objektorienterad programmering med C++, available from Studentlitteratur. I haven't read many other books though, so I can't say if it was good or not. It's not so much about learning C++ as about learning how to do proper object oriented programming... -- |
Trezker
Member #1,739
December 2001
![]() |
They told us to buy c++ Direkt in my uni... You could read Wrox press c++ tutorial, I found it very nice. |
Thomas Fjellstrom
Member #476
June 2000
![]() |
I read some crappy C++ books years ago.. and promptly forgot anything I learned. Later I learned general OO from other languages and just applied it to C/C++. Syntax is just syntax, its the new concepts that you need to learn and apply. -- |
spellcaster
Member #1,493
September 2001
![]() |
I leaerned C++ from Scott Meyers books. -- |
clovekx
Member #3,479
April 2003
![]() |
you can check this link [url http://www.fit.vutbr.cz/~peringer/UNOFFICIAL/programming/cpp.html] --- |
lucaz
Member #4,194
January 2004
|
Banana, check out Stroustrup's book. EDIT: ...and Bjarne's site too. |
Andrei Ellman
Member #3,434
April 2003
|
One place to start would be the O'Reilly and Associates Inc. Book "C++: The Core Language" ( ISBN 1-56592-116-X ). It is a book about C++ specially aimed at C programmers wanting to switch to C++. As far as C++ books go, it's short (only 200 pages), but it assumes you know C. Also, it only discusses the basics of C++ leaving out the details (but it tells you about the concepts of C++ and how to use them). To fill yourself in, I suggest you either get (buy/borrow/burgle) one of those long C++ reference-books or find a C++ reference website to look up what you still don't know. One of the things about C++ is that it comes in many layers (the most basic layer basically being C with stricter type-checking). You don't have to use all of it's features (eg. it is possible to make use of classes and inheritance while completely ignoring templates). You can learn just the layers you feel comfy with and use those, but if you chose that method of using C++, you will inevitably come accross someone else's C++ that uses these features you haven't learned yet. Learning C++ is like an odessy - There's a lot to learn, but it can be broken down into smaller chunks which can be learned one chunk at a time, but there is always something lurking round each corner. And then there's the C++ Standard Template Library (STL) and object-oriented design to get your teeth into. AE++. -- |
Thomas Fjellstrom
Member #476
June 2000
![]() |
If you think about it, all the while you're learning and using C, you are learning C++. -- |
Soga
Member #4,589
May 2004
|
I use SAMS for reference. |
gnolam
Member #2,030
March 2002
![]() |
Lots of books and few online references, but thanks all Gideon Weems said: Besides, I don't quite understand the big deal people try to make between C/C++. They're the same language.
You mean... besides the different foci, data types and interpretations of identical code snippets? -- |
Derezo
Member #1,666
April 2001
![]() |
C/C++ are very similar. I migrated without any issues. I used some references to learn about inheritance and such, but I don't usually use those practices anyway. The only thing that makes a huge difference are the additional libraries, such as STL. Spellcaster said the important difference : Stucts can now have functions, and you can protect their members.
Weeee... "He who controls the stuffing controls the Universe" |
lucaz
Member #4,194
January 2004
|
When I started to read C++ I thought, "hey, this is the same with functions in structs and some other stuff". |
Hard Rock
Member #1,547
September 2001
![]() |
The book i bought was C++ the complete reference. Its very well written and extrememly helpful. The first chapter is basically an introduction to C, and then it goes over all C++ new features and how exactly they work. It devotes a chapter to each C++ feature and compares it C, as well as going over changes between versions and shows examples of each feature. Finally the last chapter is just a reference you can use, which is great too. _________________________________________________ |
juvinious
Member #5,145
October 2004
![]() |
I'd say Herbert Schildt has made some good C++ books that are worth checking out. __________________________________________ |
Kanzure
Member #3,669
July 2003
![]() |
Gillius has some good tutorials on his site. |
Chris Katko
Member #1,881
January 2002
![]() |
Quote: I can tell you a book not to get: SAMS Learn C++ in 21 days.
Hey! I learned what C++ I know from that! Oh wait... maybe that's why I've had to relearn C++... Seriously, their example of linked-arrays is insanely long (5+ pages!) and over-complex. Quote:
Well, the title is a giveaway It is? -----sig: |
X-G
Member #856
December 2000
![]() |
Quote: It is? Anything that claims to be able to teach you such a relatively complex thing as a programming language (and likely a whole new programming paradigm to boot!) in a mere 21 days is either lying or horribly mistaken. Not even the best of teachers can pull off that stunt. If the authors can't realize that, chances are they didn't do a very good job with the book either... -- |
|
1
2
|