Skip to Content
Absolute Beginner's Guide to Programming, Third Edition
book

Absolute Beginner's Guide to Programming, Third Edition

by Greg Perry
November 2002
Beginner content levelBeginner
432 pages
11h 44m
English
Que
Content preview from Absolute Beginner's Guide to Programming, Third Edition

Fundamental Differences Between C and C++

Some of the new language features that C++ provides over C have nothing directly to do with OOP. The following sections preview some of the non-OOP language differences that you'll find between C and C++.

Comments

One of the differences is the way that C++ allows you to place comments in your C++ programs. (A comment in C or C++ is the same as a remark in Visual Basic.) Any text that follows a double slash, //, is considered by C++ to be a comment. Therefore, you don't need a closing comment symbol, such as */, as you need in C. The following shows the same comment in C++ and then in C:

intCust++;  // Add to customer count

intCust++;  /* Add to customer count */

The C++ format is often simpler to code ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Absolute Beginner's Guide to Programming, Second Edition

Absolute Beginner's Guide to Programming, Second Edition

Greg Perry

Publisher Resources

ISBN: 0789729059Purchase book