Step one: reads cpp from disk into memory, translating the text to "the basic source
character set" encoding. Trigraphs are replaced
if (i>j) ??<std::cout << array??(j??); ??>
BECOMES
if (i>j) {std::cout << array[j]; }
Step Two: physical lines are spliced into logical lines
if (i>j) \
{ std::cout << array[j]; }
BECOMES
if (i>j) { std::cout << array[j]; }
Step Three: Tokenizer:
if (i>j) /*make sure it's safe*/ { std::cout << array[j]; }
BECOMES
if ( i > j ) { std :: cout << array [ j ] ; }
Step Four: Preprocessor executed:
#include <string>
BECOMES
template<dadada>
class basic_string {
bla bla bla
};
typdef basic_string<dadada> string;
Step Five: String literals translated to "execution character set" encoding.
Can't show this step, both sides look the same.
Step Six: Adjacent string literal tokens are concatenated.
"Hello" "World" "!"
BECOMES
"HelloWorld!"
Step Seven: tokens for each cpp file are syntactically and semantically analyzed and translated
as a translation unit.
Can't show this step, text is translated to a assembly of some sort (usually)
Step Eight: all cpp files' trees are linked togeather
Can't show this step, text is translated to a assembly of some sort (usually)
Step Nine: The assembly is linked against the OS and stuff
Can't show this step, text is translated to a executable of some sort (usually)