Learn C++: Hello World

Write, compile, and execute your first C++ program!

Start[missing "en.views.course_landing_page.learn-c-plus-plus.course_illustration" translation]
Chevron Left Icon
Hello World
Lesson 1 of 2
Chevron Right Icon
  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 and his team at Bell Laboratori...

  2. 2

    Take a look at the hello.cpp file in the middle of the screen. It's a C++ program! In our text editor, you can find the file name at the top: C++ "programs" are stored in files which usual...

  3. 3

    High five! We just got your first C++ program to run! C++, like most programming languages, runs line by line, from top to bottom. Here is the structure of a C++ program: In between the curl...

  4. 4

    We learned how to output on a line with the following code: [...] It will output: [...] We can also output multiple lines by stacking one [...] statement over another: [...] This will...

  5. 5

    Woohoo! You have written your first C++ programs! --> In this lesson, you have learned: - C++ is a general purpose coding language. - C++ runs line by line, from top to bottom. - [...] is h...

  1. 1

    C++ is a compiled language. That means that to get a C++ program to run, you must first translate it from the human-readable form to something a machine can "understand." That translation is done b...

  2. 2

    Compile: A computer can only understand machine code. A compiler can translate the C++ programs that we write into machine code. To compile a file, you need to type [...] and the file name ...

  3. 3

    Compile: Sometimes when we compile, we want to give the output executable file a specific name. To do so, the compile command is slightly different. We still need to write [...] and the file ...

  4. 4

    Programming is often highly collaborative. In addition, our own code can quickly become difficult to understand when we return to it — sometimes only a few hours later! For these reasons, it's ofte...

  5. 5

    Congratulations! In this lesson, you have learned: - Compilation and execution using the terminal. [...] [...] - Single line comment can be done using [...] . - Multi-line comment can be ...

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

Learn C++: Hello World

Start[missing "en.views.course_landing_page.learn-c-plus-plus.course_illustration" translation]