C++ Syntax and Comments
Statements end with ;, blocks use { }, and C++ is case-sensitive. using namespace std; lets you skip the std:: prefix.
ExampleC++
#include <iostream>
using namespace std;
int main() {
// single-line comment
cout << "One" << endl;
/* multi-line
comment */
cout << "Two " << "Three" << "\n";
return 0;
}Output
One Two Three
Quick check
What does using namespace std; let you do?
Finish the quick check (and any code exercise) to complete this lesson, or mark it done yourself.
Tip: use the left and right arrow keys to move between lessons.