C++ TutorialLesson 3Free preview
C++ Get Started
This lesson is part of C++ · All levels
Summary
This lesson guides you from writing the first code to running it on a computer. The process is simple: write code to the editor, save it with the .cpp extension, then compile using a compiler to produce an executable file. You also learn the minimum structure of a program, which is the function main() and the output commands in it.
Key points
- The C++ work step: write the code, save the .cpp, compile, and then run the result.
- The main() function is the beginning of any C++ program.
- Cout << is used to print the output to the console.
- Return 0; indicates that the program is completed with a success status.
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.