Semicolon in C++?

后端 未结 9 1617
心在旅途
心在旅途 2020-12-16 11:07

Is the \"missing semicolon\" error really required? Why not treat it as a warning?

When I compile this code

int f = 1
int h=2;

the

9条回答
  •  一生所求
    2020-12-16 11:44

    ; is for the programmer's convenience. If the line of code is very long then we can press enter and go to second line because we have ; for line separator. It is programming conventions. There must be a line separator.

提交回复
热议问题