Objective-C++

Objective-C is a small set of extensions to ANSI C. Objective-C++ is the same set of extensions applied to C++. Apple’s Objective-C compiler is also an Objective-C++ compiler.

One of the advantages of Objective-C is that, as a super-set of ANSI C, it can be easily mixed with the millions of lines of existing C code in the world. Objective-C++ can be mixed with the millions of lines of C++ code that already exist. C++ features, such as name mangling, are fully supported by Objective-C++ so that direct linkage between Objective-C++ code and existing C++ code is possible.

Objective-C source code files are identified by the .m extension. Apple’s compiler treats files with the .M or .mm extensions as Objective-C++ source code. Additionally, ...

Get Cocoa® Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.