Member Avatar

hi, i would like to ask you to help me 'cause i am pretty new in programming and idk what's wrong with that :/ i am still getting an error that " 'main' must return 'int' "...thanks


using namespace std;

class GradeBook
             void displayMessage(string courseName){
                  cout<<"Welcome to the grade book of \n" <<courseName<<"!"<<endl;

int main(){
    string courseName;
    GradeBook myGradeBook;
    cout<<"Please Enter the course name: "<<endl;
    getline(cin, courseName);
    return 0;

Class definitions end with a semicolon. Yours does not, and the compiler is interpreting that as a part of the return type for main.