semicolon in C++?
- by SysAdmin
Here is the question
Is "missing semicolon" error really required? why not treat it as a warning?
Why I am asking this stupid question?
When I compile this code
int f = 1
int h=2;
the compiler intelligently tells me that where I am missing it. but to me its like - "If you know it, just treat it as if its there and go ahead. (Later I can fix the warning)
int sdf = 1,df=2;
sdf=1 df =2
even for this code it behaves the same. i.e even if multiple statements (without ;) are in the same line, the compiler knows.
So,
why not just remove this requirement? why not behave like python,vb etc