Introduction to C++ Flashcards
Line
Row of Text
{}
Braces
Surround a list of statements
Statement
Program instruction
Ends with semicolon
return 0
Ends the program without an error
cout
Character Out
Prints a program’s output
endl
Creates a new line in the output
main
Starting place of a program
“text in double quotes”
String literal
Comment
Text added to code to be read by humans but ignored by the compiler // single-line comment /*multi-line comment*/
Block Comment
Multi-line comment
Whitespace
Blank spaces between items within a statement
Syntax Error
aka Compile-Time Error
Violating a programming language’s rules on how symbols can be combined to create a program
Logic Error
aka Runtime Error / Bug
Occurs while a program runs
C++
C-based language
Supports object-oriented programming
=
Assign value on right to variable on left
cin
Character In
Stores user entered value into given variable
const
Constant Variable
Variable whose value should not be changed while the program runs.
Overflow
Occurs when value being assigned is greater than the max value a variable can store.
Integer overflow - drops the higher bits and can dramatically alter the number
Floating-point overflow results in infinity
Compiler Warning
A message that indicates a potential problem
Preprocessor
Tool that scans the file looking for lines that with with # which direct preprocessor to modify the file before compilation continues.