OOPortal
J2EEOnline RationalDB
prev next prev next
Course navigation
Lesson 13
Getting started with C++ Conclusion
In this module you learned some of the differences and similarities between C and C++.
In addition, you started getting familiar with writing C++ code.
You learned that:
  1. C++ uses the variable cout and the put to operator << for standard output. Standard input is handled by using the variable cin with the get from operator >>.
  2. C++ uses a preprocessor to handle a set of directives, just like C. However, rather than relying on the #define macro for creating constants, C++ uses the keyword const.
  3. Relational, equality, and logical expressions evaluate as bool expressions, which yield either the bool value false or the bool value true.
  4. C++ allows a safer form of cast than C. You should use static_cast instead of the older C style of casts.
  5. C++ allows declarations to be intermixed with executable statements. The scope of the declaration is the innermost block within which it is found, and the identifier is visible starting at the point at which it is declared. Otherwise, the scope rules are the same as in C.
  6. C++, like C, treats char* as a form of string type. C++ provides the cstring package to assist in the standardization and re-use of string code.
  7. While still allowing the uses of the bracket-pair comment symbols /* */, the preferred comment style of C++ programs is the rest-of-line comment symbol //.
Basic Cplus Quiz
Click the Quiz link below to take a multiple-choice quiz covering the topics presented in this module.
Basic Cplus - Quiz
Course navigation