Skip to content

Errors and comments

Read · 1 of 5

The compiler checks your code first

If something is wrong, it refuses to build the program and tells you the line number and what it expected.

The most common beginner mistakes: a missing ;, a missing quote, or a misspelled word (C++ cares about capitals: Cout isn't cout).

1main.cpp:5:30: error: expected ';' before 'return'