Cplusplus+Commands

Headers (Libraries)

 * 1) include
 * || Input/Output Stream ||

Beginning “Stuff”

 * using namespace std || tells compiler to use standard C++ library ||
 * void main || begins the main function ||

Data Types

 * int || integer type ||
 * double || decimal type ||

Commands:

 * cout << “text” || outputs “text” to console ||
 * cin >> input || reads input and stores in appropriate variable ||
 * endl; || ends line in console, brings cursor to beginning of next line ||
 * return || sends a return value to the function ||

Selection Statements:
{ // do something } else { // do something else } || // do something } else if (condition) { // do something else } else if (condition) { // do something else } else { // do something else } || { case : // statements break; case : // statements break; case : // statements break; case : // statements break; default: // default statements } ||
 * ‍if statement || if (condition){ // do something} ||
 * if . . . else statement || if (condition)
 * extended if statement || if (condition){
 * switch statement || switch (selector)

Escape Characters:

 * \t || tab ||
 * \b || backspace ||
 * \” || double quote ||
 * \’ || single quote ||
 * \? || question mark ||
 * \\ || backslash ||
 * \a || alert (beep) ||
 * \n || newline ||

{ // do stuff } || { // do stuff } || { // do stuff } while (condition) ||
 * Loops:**
 * for loop || for(initialized expression; termination condition; update expression)
 * while loop || while (condition)
 * do ... while loop || do