A book to compare C and C++

Dear all:

I am curious if there any books that compares the similarity/difference of C and C++? For example, when comes to const, I would like to see a book telling the differences of using const for C and C++. In C, const cannot be placed after function name whereas it can be placed after the function name in C++... Just something like this.

I learned C before and now I am self-teaching C++. I just want to refresh my C knowledge and learn C++ in parallel and gain a better understanding of the difference and similarity of these two languages.

Thanks a lot.
Last edited on
If you are referring to member functions, that usage of const is different than the normal use of const. It means that the member function in question will not modify the object (meaning that the this pointer is const).
Thanks for firedraco's reply. Yes, I just want to name an example. Actually I am expecting some book can explain the way firedraco did.
The C++ standard has an annexure on compatibility; the first section in the annexure lists the differences in semantics for constructs which are also valid constructs in ISO C. Working drafts are freely downloadable; for instance N3690: http://isocpp.org/files/papers/N3690.pdf

C++ Annotations http://cppannotations.sourceforge.net/annotations/html/ has a section on 'Differences between C and C++' which highlights some of the extensions to C (eg. function name overloading) that C++ provides.

The last chapter of Stroustrup's 'The C++ Programming Language, 4th Edition' http://www.stroustrup.com/4th.html discusses C/C++ Compatibility issues in detail.
JLBorges, thanks for your information, those references really helps.
Topic archived. No new replies allowed.