+ 1
If the compiler can detect there is a semicolon missing in line 42 , then why just it can't put a semicolon itself?
🤔🤔🤔
5 Respuestas
+ 4
Because it doesn't know if the semicolon missing is the real problem or if it is generated by another mistake somewhere else
+ 4
Compilers's errors or warning aren't there for nothing. They are here to tell you that something went wrong on a specific line. Even if it knows what's the mistake, it isn't his job to correct it. Else, it would create even more errors, because it doesn't know in which way you've implementing your solution.
Imagine a compiler saying :
'Error, print is not defined, did you mean printf' => then the compiler replace print with printf.
In fact, you really want to call a function named print, but you forgot including the right header. Then, all your code is false and you have to correct the compiler's correction manually : that's not worth!
0
Well even if it could add the semi colon , it would take more time as usual