Here, the class definition and the main function must be in the same file and the type of the main function must be void. It has 1 error & 1 warning:
How to fix it? I really need your help.Code:
#include <iostream>
using namespace std;
class X
{
}
void main() //error: the class followed by void is illegal.
{
}//warning: 'main' : function should return a value; 'void' return type assumed