member function error..

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • adrix7
    New Member
    • Jun 2008
    • 1

    member function error..

    hi, been having error "member function error" i really dont know what to do, please help. I've typed the error in Bold..

    thanks guys/gals!

    [code=cpp]
    int yes1;

    // create a GradeBook object; pass a course name and instructor name
    GradeBook gradeBook( "CS101 Introduction to C++ Programming" );

    //error no matching function for call to GradeBook::Grad eBook

    // display welcome message and instructor's name
    gradeBook.displ ayMessage();


    //cout << "Welcome to"<< gradeBook.getCo urseName() << gradeBook.getIn structorName() << endl;
    // gradeBook.displ ayMessage() <<endl;

    cout << "\nPlease Enter 1 if you want to change Instructor's Name or 2 if not: "; cin >> yes1;
    /* write cde to change instructor's name and output changes */[/code]
  • oler1s
    Recognized Expert Contributor
    • Aug 2007
    • 671

    #2
    So, do you actually have a constructor written for GradeBook? That can take in a string?

    I’ll give you a few other pieces of advice as well. First, please post code properly. You want to give us the smallest possible compileable snippet of code that demonstrates your problem. Post this code properly, in CODE tags.

    Also, when you get an error, read the error. If you don’t understand what an error is saying, then your question is how to interpret that diagnostic message.

    Comment

    • Visame
      New Member
      • Dec 2007
      • 7

      #3
      Obviously, your class lack the CONSTRUCTOR.

      Comment

      Working...