What doing a colon in C++ | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
- 1

What doing a colon in C++

24th May 2017, 5:17 PM
Rafał
Rafał - avatar
3 Antworten
+ 1
Do you want to know why is there a semicolon in C++ statements? If so, you can break your statement into many lines and the compiler will understand where it ends. The semicolon indicates the end of each statement, if you forget it, the compiler can yeld an error, because it doesn't understand what you want to do
24th May 2017, 5:26 PM
Tiago Soares
Tiago Soares - avatar
+ 1
The colon in other hand is used for example to separate parameters in function, etc
24th May 2017, 5:33 PM
Tiago Soares
Tiago Soares - avatar
0
Thank you.The second answer is what I wanted to know, but thanks also for the first answer.
24th May 2017, 6:39 PM
Rafał
Rafał - avatar