Basics Summary
In this lesson we learned the basic concepts of C++:
- Basic structure of a C++ program:
#include <iostream>for input/output operations- The
main()function as the program's entry point - Curly braces
{}to denote code blocks
- Text output using:
std::coutfor output- The
<<operator for output direction std::endlto end the line
- Multiple ways to output multiple lines:
- Multiple
std::coutcommands - One
std::coutcommand with multiplestd::endl
- Multiple
- Comments for code documentation:
- Single-line comments
// - Multi-line comments
/* */
- Single-line comments
In the next lesson we will cover variables and data types in C++!
Instructions
Congratulations on completing the basic C++ lesson! When you're ready, you can continue to the next lesson.
Start programming for free
5/5