0
In C you are not allowed to nest comments as /* hello /* this is */ invalid */ . Is this true foe C++ also?
5 Respuestas
+ 1
Yes as C++ is same as C only has OOP as additional concept.
You can also try this in playground , it will produce error.
Hope this helps ☺️☺️.
+ 2
Its impossible to nest comment cuz when you type /* the following will be thought as comment until a */ shown up. Thus, another /* in the comment will also be thought as part of the comment. Hope u understand what i am saying.
+ 1
Yes I will be happy to help.
But if you try to debbug code (attached) , will improve your debugging skill.
https://code.sololearn.com/cfOF106P4w7o/?ref=app
0
Also why dose this happen. isn't everything inside /* ... */ is ignored ?
0
question
why would you ever want to nest a comment