Chapter 9

From Java to C++


WHEN I WROTE THE FIRST VERSION OF THESE NOTES in 1996, Java was still a very new programming language. Although it had already caused a lot of excitement, it's long-term prospects were not entirely clear. Now, in the middle of 1998, I think it is clear that Java is an important language and will remain so for the long term. However, it is true at least for now that most "serious" programming is done in C and C++. Fortunately, these languages share a lot of features with Java. The older language, C, has no object-oriented features. C++ is a much larger language, which extends C with classes, objects, and other features. This chapter serves as a brief introduction to C++ for someone who already knows Java. The coverage here is very incomplete, and is meant only as a starting point for learning about C++.

You'll find that a lot of the basics ("programming in the small") are almost identical in Java and C++. However, both the programming philosophy and the large-scale structure of programs ("programming in the large") in C++ are quite different from Java.


Sections in Chapter 9:

  1. C++ Programming Fundamentals
  2. Pointers and Arrays in C++
  3. Classes and Objects in C++

[ First Section | Previous Chapter | Main Index ]