Key Concepts

Review core concepts you need to learn to master this subject

New Line

std::cout << "Hello\n"; std::cout << "Hello again\n";

The escape sequence \n (backward slash and the letter n) generates a new line in a text string.

Hello World
Lesson 1 of 2
  1. 1
    There are only two kinds of languages: the ones people complain about and the ones nobody uses. C++ is a programming language created by [Bjarne Stroustrup](https://news.codecademy.com/bjarne-st…
  2. 2
    Take a look at the hello.cpp file in the code editor that is placed in the middle of the screen. It’s a C++ program! In our code editor, the file name is displayed at the top: ![File](https:/…
  3. 3
    High five! We just got your first program to run. C++, like most programming languages, runs line by line, from top to bottom. Here is the structure of a C++ program: ![Program Structure](https:/…
  4. 4
    We learned how to output a line of text with the following code: std::cout << “🚙💨\n”; It will output: 🚙💨 We can also output multiple lines by adding more std::cout statements: std::cout << …
  5. 5
    Woohoo! You have written a few C++ programs. 🙌 In this lesson, you have learned: - C++ is a general-purpose coding language. - C++ runs line by line, from top to bottom. - std::cout is how you ou…

What you'll create

Portfolio projects that showcase your new skills

Pro Logo

How you'll master it

Stress-test your knowledge with quizzes that help commit syntax to memory

Pro Logo