11.2 Notes on Compiling a C Program with the C++ Compiler

(1)

Functions with Prototype Declarations

Before using a function, a prototype declaration is necessary. At this time, the types of the parameters should also be declared.

 

(2)

Linkage of const Objects

Whereas in C programs const type objects are linked externally, in C++ programs they are linked internally. In addition, const type objects require initial values.

 

(3)

Assignment of void*

In C++ programs, if explicit casting is not used, assignment of pointers to other objects (excluding pointers to functions and to members) is not possible.