While doing class based programing in C++, the following error occurs.
Class declarations should end with a semicolon.
In the above program, the class terminates near the yellow marking, but a semicolon is missing.
Remember that the same structure of a "struct" is used for classes too. Structures end with a semicolon,similarly classes should also end with a semicolon.
'classname' followed by 'int' is illegal (did you forget a ';'?)The error occurs if the class declaration is not terminated properly.
Class declarations should end with a semicolon.
In the above program, the class terminates near the yellow marking, but a semicolon is missing.
Remember that the same structure of a "struct" is used for classes too. Structures end with a semicolon,similarly classes should also end with a semicolon.
Thanks for this, It helped me a lot. :)
ReplyDeleteThanks a lot! Simple semicolon fixed my problem.
ReplyDelete