Skip over navigation

Getting Started in C++

Terms

Introduction and Summary

Introduction to C++ Programs

#include  -  The #include command tells the compiler to use the specified header file as part of your program.
Header File  -  A file ending in .h which contains definitions of variables, classes, and functions that may be useful in your code.
Syntax  -  The usage of a programming language command; the form in which a statement must appear.
Void  -  Used for functions which have no return type; that is, functions that perform actions but do not return an "answer."
Main()  -  Where C++ programs begin execution; must be present in every C++ program.
Cout  -  The basic C++ output command, defined in the iostream.h header file. cout can print out all primitive data types and string constants using the << operator. E.g.: cout << "The average score is: " << 84.7 << endl;
Functions  -  Segments of code that behave as mini-programs. Functions are the building blocks of full programs.
Comment  -  A human readable line or lines in a computer program. Often used to document the code.
White Space  -  White space is composed of spaces, tabs, and newlines, all of which the compiler ignores when compiling a program.
Variables  -  Variables are symbols in a program that take on values and which are manipulated for the purposes of the program. Variables are the nuts and bolts of a program.
Classes  -  Classes are collections of variables and functions, which together form an coherent, abstract thing referred to as an object.
Data Members  -  Variables that are part of an object.
Member Function  -  Functions belonging to a particular class which manipulate that class's data members.
Global Variable  -  A variable that is "visible" (or "in scope") to the entire program.
Data Types  -  The possible types of variables. Some examples of data types are: integers, characters and floating point numbers.
Escape Sequence  -  Escape sequences are symbols that represent special characters. For instance, the escape sequence '\\n' represents the new line symbol, and '\\' represents the backslash symbol.
String  -  A sequence of characters, usually represented between quotation marks. E.g.: "There are 42 characters in this sentence.\\n"
Constant  -  A constant is a variable whose value does not change for the duration of a program. To create a constant, declare a variable const. It must be defined at declaration.
Enumerated  -  Enumerated data types are user-defined data types. Using the keyword enum, a programmer can choose the values that each enumerated variable can take on.

Follow Us