C++ Chapter 3

terms and definition
the numbers inside the parentheses in a function.
Implicit type conversion
One data type outranks another if it can hold a larger number.
type cast expression
lets you manually promote or demote a value. the general format for a type cast expression is: static_cast<datatype>(value)
named constants
like a varialbe, buts its content is read-only and cannot be changed while the program is running.
define directive
used the same way as a named constant
combined assignment operators
used to adjust values by replacing the value that was previously storeed there. (number = number-1 is equivalent to number -= 1
the way a value is printed
offers a way of specifying the minimum number of spaces to use for each number.
this maniuplator rounds a number to a certain amount of significant digits
this manipulator indicates that a floating-point output should be printed in decimal notation. When used in conjuction with the setprcesision manipulator it specifies the number of digits to be displayed after the decimal point of a loating-point number, rather than the total number of digits to be displated.
shows the decimal point regardless of if it is needed or not
a special funtion that will read in an etnire line, including leading and embedded spaces, and store it in a string object. getline (cin, name);
used same as getline, but with a character and not a string
this funtion tells the cin object to skip characters in the keyboard buffer. cin.ignore (n, c). the arguments shown in the parentheses are optional. if used, n is an integer and c is a character. they tell cin to skip n number of characters, or until the character c is encountered. Statements that mix cin >> and cin.get can be repaired by inserting a cin.ignore statement after the cin >> statement
the way to create a string variable in C, a string defined in this manner is called a C-string. char word [10] = "Hello";
size declarator
tells how many memory cells to set up to hold the characters in the C-string
a function that is used to copy the contents of one string into another. strcopy (name1, sebastien) this copies Sebastien to name1.
used to prevent buffer overrun when entering a string to be used with a C-string. cin.width(5) accounts for the \n at the end, meaning it will only hold up to 4 characters in it
the cstdlib is required for this function and is used to generate a random number from an algorithm. But because it is an algorithm, the numbers are the same each time the program runs
a file needed that contains all the definitions necessary for file operations.
file stream objects
the stream that must be identified prior to copying information to a file. Either ofstream, ifstream, or fstream. After identifying the stream, directly after it goes the file you would like to output/input to.
ofstream ofile;
Opening the file