Important Notes

Episode 6:

  1. Use visual mode to select the code and use '<leader>pp or ,pp' to run the program in cpp.
  2. c++ is compiled language so we need to compile the code first and then run it. example: g++, clang, intel compiler etc.
  3. The job of compiler is to convert the c++ code into machine code (binary file) or executable.
  4. we always save first and then compile the code.

example:

#include <iostream>
int main() {
	std::cout << "Hello, World!" << std::endl;
	return 0;
	//return EXIT_SUCCESS; // if we include <cstdlib>
//	return RETURN_SUCCESS; // if we include <cstdlib
}

output:
'Hello, World!'