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

Recap

You might be surprised to learn that, although it’s a good start, this chapter only scratches the surface of C++ programming. However, the chapter covered the most useful differences between C and C++, along with the best of the new features for object-oriented programming and creating robust code.

The salient points of C++ features are as follows:

  • Remember that functions are declared before use.

  • Variables can be declared anywhere.

  • Scope is restricted to code blocks.

  • The new and delete keywords can be used to create memory blocks.

Then, if you need abstract data types in your C++ code, you can use classes:

  • Classes are defined in header files.

  • Classes must be implemented in source files.

  • Class code is compiled file by file.

The advantages of ...

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