What Is C?

What Is C++?

You can see that the C programming language was developed first, C++ was developed later. You might be asking yourself what, exactly, is C++ and how does it relate to C? The answer is that C++ is essentially C taken to the next level. The most obvious difference between the two is that C++ supports object orientation (more on that in Chapters 10, 11, and 12). However, C++ sports many other improvements over C. For example, C++ handles strings better than C, and has a more robust exception handling. (Exception handling refers to a program’s ability to handle unexpected errors. What if the user inputs a zero then tries to divide by that number? This is an exception, how your code handles it is exception handling. Chapter 7 discusses this topic in depth.)

C code will compile fine in most C++ compilers, but the reverse is not true. C++ code will not necessarily compile in a C compiler. You may be wondering what is meant by the word code. Code is essentially the series of programming commands that a programmer writes. All the commands that make up a program are the source code for that program.

C++ supports all C commands and also has many additions. You may frequently see old style C code mixed in with C++ code, especially in programs written by programmers who originally started in C.

C++ Programming Fundamentals
C++ Programming Fundamentals (Cyberrookies)
ISBN: 1584502371
EAN: 2147483647
Year: 2005
Pages: 197
Authors: Chuck Easttom

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net