OOP in C and C++

Although, Java is currently alive and well in server-side Web programming and making some inroads in the business middleware area, C and C++ are currently the languages of choice for high-performance and desktop software. Outside of the Web programming industry, C/C++ skills along with VB skills are still important in the job market. In this lecture, we give a brief overview of C and C++ concentrating on the differences between these and Java. Our main goal will be to explain how to use the OO design and implementation techniques we learned in Java to other environments.

Historically, C++ was developed as an OO extension to C. However, since we are already familiar with OOP principles, we will be working backward in history starting with C++ then discussing OOP in C.


The good news is most of the syntax we learned in Java applies directly to C++ (the Java developers wisely copied C syntax rather than gratuituously invent something different). The main differences are in features, semantics, and terminology (C++ gives different names to things like instance variables, we will continue to use Java terminology here).

Defining Classes in C++

Using Classes in C++

Inheritance in C++

Polymorphism in C++

Other C++ Arcania

OOP in C

Misc C facts