What Is a C Program?


What Is a C++ Program?

Well, it contains exactly the same elements as any other computer program— data to store your information and blocks of code that manipulate that data. Whether your previous experience is with Microsoft Visual Basic or with 40- year-old COBOL, the basic elements will be familiar. Much mystery surrounds the practice of C++ programming, but most of it is unwarranted and unnecessary. Let’s start with some basic ground rules for C++.

C++ is a strongly typed language.

If you have a variable that has been declared able to store apples, you can store only apples in it. However, this requirement is not as grim as it sounds. C++ contains many features for providing implicit conversions where necessary. This strong type checking eliminates many common programming bugs because it explicitly disallows any data type conversions that could result in data loss.

C++ is an efficient language.

If you write code that needs to execute quickly (for example, code that sorts lists or performs complex mathematics), C++ should be your language of choice.

C++ is an object-oriented language.

Modern programmers like the many advantages of object-oriented programming. (See Chapter 2 for more information on object-oriented programming.) C++ is one of the premier object-oriented programming languages.

C++ is based on C (as you might suspect).

C is a well-established language. Although C++ includes some strange features—to maintain its compatibility with C—it probably wouldn’t be as popular as it is without C compatibility.

C++ is a case-sensitive language.

If the compiler warns you about an undeclared variable, you probably typed an uppercase character instead of a lowercase character (or vice versa).




Microsoft Visual C++  .NET(c) Step by Step
Microsoft Visual C++ .NET(c) Step by Step
ISBN: 735615675
EAN: N/A
Year: 2003
Pages: 208

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