Getting Started
Why I Created CppLearn
After searching through many other C++ resources I still didn't feel satisfied. Web sites tended to go into much detail of the syntax but not the rationale behi…
Creating and Running Your First C++ Program
All C++ programs must have a starting point for execution. This is a special function called main. When you run a program, the operating system calls main, exec…
How C++ Compilation Works
Learn how a C++ compiler translates your plain text source code into a runnable binary program through preprocessing, compilation, and linking.
Understanding main()
When the operating system loads a C++ program, it searches for a single function that it can call. The name of this function has to be main. The program is run…
Statements, Semicolons, and Whitespace
A C++ program is a sequence of one or more instructions which the computer executes, in order, one by one. Each instruction is called a statement. Most statemen…
Comments and Basic Code Formatting
The source code is read by two different entities. The compiler requires the language to be represented correctly. The human reader needs the same code to be im…
Compiler, Linker, and Runtime Errors
Mistakes do not all appear simultaneously in a C++ program. Some mistakes become evident while a single source file is being checked by the compiler, some only…