Skip to content

Latest commit

 

History

History
29 lines (22 loc) · 1.21 KB

01 Lesson1 Notes.md

File metadata and controls

29 lines (22 loc) · 1.21 KB

Lesson 1 - Getting Start

How To Read

  • IDE: Integrated Development Environment.
  • #include: Hash-include, Sharp-include, Pound-include.
  • std::cout: Standard-c-out, c- console.
  • endl: End-line.

Steps to Generating an Executable

  1. Writing (or programming) C++ code using a text editor.
  2. Compiling code using a C++ compiler that converts it to a machine language version contained in “object files”.
  3. Linking the output of the compiler using a linker to get an executable (.exe in Windows, for example).

Building and Executing Your First C++ Application

Using Linux:
$ g++ -o hello Hello.cpp

This command instructs g++ compiler to create an executable named hello by compiling your C++ file Hello.cpp.

Then run it with:
$ ./hello

Do

  • Do save your files with the .cpp extension.
  • Do use a simple text editor or an Integrated Development Environment to write code.

Don'T

  • Don’T use a .c extension for your C++ file because some compilers would compile these files as C programs instead of C++.
  • Don’T use rich text editors like word processors to write code, because they often add their own markup in addition to the code you program.