akshay agarwal answered 4/19/2007 How Does A Compiler Work In A C++ Program? A C++ compiler first checks all the syntaxes which are being used in a program. If the syntax is correct then compiler generates an assembly code for assembler.