Getting Started in C++


Introduction and Summary

C++ is a computer programming language that supports object-oriented programming, meaning it is largely concerned with the manipulation of special variables called objects. Classes are used to create objects, but before learning about them it is essential to understand the basic structure of C++ programs and the elements that form the basis of class definitions. The general format of a C++ program starts with one or more header files, which contain predefined functions and classes. Using the #include keyword, you can use such files, allowing your program to access the classes and functions they define. After the header files come class definitions and definitions of their respective member functions, followed by other functions for your program. After declaring global variables for your program, the main() function is defined. This is where program execution begins.

Programming is essentially the manipulation of variables, of which there are several varieties. Integers, characters, and floating point numbers form the crux of C++'s primitive data types. Each type has a different range of values it can assume. Most character values can be written as keyboard characters between single quotation marks; however, some symbols require special escape sequences to represent the character, such as the tab character '\\t'. Variables should be declared const if they hold a value that will not change for the duration of the program. You can create your own kind of data type with the enum command, which allows you to specify the name of your data type and the values it can take on.

Take a Study Break

SparkLife

What's your Pretty Little Liars name?

Take this quiz to find out!

SparkLife

Which young actress just got married?

Click to find out!

SparkLife

Cat bearding WINS THE INTERNET

Have you seen this yet?

SparkLife

Scary movies with funny posters

These. Are. Hilarious.

Geek out!

The MindHut

Geeky Actors: Then and Now

Travel back in time!

The MindHut

Villains We Want These Actresses to Play

From super cute to super bad!

The MindHut

10 Movies Better Than Their Books

What do you think?

The MindHut

Summer Movie Open Thread

Leave your thoughts here!

The MindHut

12 Scientific Inaccuracies in Into Darkness

What did Star Trek get wrong?