Moving form c to c++
In the past months I acquired good C programming skills and now I'd like to make a step further and learn well C++ (if possible using MS Visual C++ environment).. I can already program Java (althought I cannot consider myself an experienced Java programmer).
My question is: in the jungle of books and tutorials available online and in bookshops, which could be, in your opinion, a good (and above all fast) path to be followed by people in my conditions?
Many thanks for any suggestion you'll give me! :)
The very first time I got into programming was with the QBasic language, which isn't very well heard of now. I used tutorials online and no books. During these tutorials, alot of C++ was mentioned on the side or links leading to C++ sites. So I took the hint and found this site, which I use often. I went out and bought a book with an accompanying Dev C++ compiler, which started me off. I then purchased a book not long after titled: SAMS TEACH YOURSELF C++ IN 21 DAYS. I still learn from this book now, in fact, i'm reading it at this very moment! I highly reccomend it, but you can also look at the book recommendations on this board, and the programming links which direct you to tutorials. If you know C, then you know most of C++.
No, unfortunately, you don't.
Originally Posted by legit
You know the C subset of C++ which is rarely (or at least should not be) used in modern C++ programs.
The syntax is mostly the same, though.
Anyway, the compiler doesn't matter - Visual C++ or Dev-C++ - it's all fine. For good books, I cannot recommend more than looking at the books thread that's pinned on the board.
I guess that Legit and Elysia are pointing out that there are two aspects of C++:
1. Object oriented programming and use of existing objects from libraries.
2. The language features in themselves.
By knowing C, you know a fair bit of #2 in the list above. You do not (unless you have been using C in a very advanced way) know much about #1 - but if you have been using Java, then you should at least grasp the fundamentals of objects and how to use those to achieve something.
#1 in the list above is also the much harder bit to learn.
Except for the whole OO bit - there is one another advanced area of C++ that C does not have, and that is generic programming with templates.
These two bits make up quite a bit of the language. Template programming isn't as common, though, I suppose, but it is one of the most powerful features of C++ that many library writers try to master.
And aside from that, C++ thinking is much different from that of a C programmer, so there's a lot to learn.
Yes, that's what I tried to say in #1 - Object Oriented programming uses a completely different mindset than standard C programming [at least if you do either as they were intended to be used - it is entirely possible to use C++ as a "bigger, beefier" version of C, but that is not using the language to it's best advantage - and I have seen object oriented code written in C, but that is REALLY hard work for the programmer].
Originally Posted by Elysia