O'Reilly logo

Just Enough C/C++ Programming by Guy W. Lecky-Thompson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Differences in Code Organization

C and C++ differ in a number of places. Some of the major differences are in the declarations and scope of variables, which are slightly more flexible and logical from the programming perspective in C++.

In addition, there are some entirely new operators that simplify memory access and the way that functions are treated. In addition, there are two entirely new concepts to add to a working knowledge of C++:

  • Classes

  • Exception handling

You’ll read more about these concepts later on in the chapter; they borrow on some of the new features discussed here. It is useful just to consider the various differences between the two languages before trying to understand classes or exception handling.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required