Getting Started with C++
What is C++?
Released in 1985, C++ is an object-oriented programming language created by BjarneStroustrup. C++ maintains almost all aspects of the C language, while simplifyingmemory management and adding several features - including a new datatype knownas a class (you will learn more about these later) - to allow object-oriented programming. C++ maintains the features of C which allowed for low-level memoryaccess but also gives the programmer new tools to simplify memory management.
What is C++ used for?
C++ is a powerful general-purpose programming language. It can be used to createsmall programs or large applications. It can be used to make CGI scripts or console-only DOS programs. C++ allows you to create programs to do almost anything youneed to do. The creator of C++,Bjarne Stroustrup, has put together a partial listof
applications written in C++.
What is Object-Oriented Programming?
Object oriented programming is essentially building a program around self-containedcollections of data and code to modify that data; this programming model is incontrast to a model that uses function that act on data scattered throughout a program.Object-oriented programming (or coding, as programming is commonly referred to) isan organizational style, but it helps programmers create reusable code because thecode to do a specific thing is entirely contained within a single section of code, and touse the code to perform tasks - for instance, creating a menu - involves using only asmall number of functions to access the internals of the class. Think of it as a black box that can be easily carried from place to place, and that performs complex actionssimply at the press of a button: for instance, a microwave lets you heat food for aspecified time limit - say, two minutes - by typing in the time and pressing the heat button. You do not need to know how the microwave operates or why the physicsworks. In the same way that self-contained appliances simplify life for the consumer,object-oriented programming simplifies the transfer of source code from one programto another program by encapsulating it - putting it all in one place.
What do you need to program in C or C++?
In order to make usable programs in C or C++, you will need a compiler. A compiler converts source code - the actual instructions typed by the programmer - into anexecutable file. Numerous compilers are available for C and C++. Listed on thesidebar are several pages with information on specific compilers. For beginners,Bloodshed Dev,which uses a Windows interface, is a free and easy-to-use compiler.