I Need Your Help

Welcome. Please Login, Register, Or Activate! 
type your username and password to login
Date: November 23, 2009, 07:56 AM
431084 members and 298150 Topics
Latest Member: SmenseGam
Nairaland [Nigerian Forum] Home Help Search Who is currently online? Login Register
Nairaland Forum  |  Technology  |  Programming  |  I Need Your Help
Pages: (1) Go Down Send this topic Notify of replies
Author Topic: I Need Your Help  (Read 90 views)
esf_lagos
I Need Your Help
« on: October 17, 2009, 06:10 AM »

pls am new to c++ programming and  am ahving problems in trying to debug this class . pls if there is any boby that could enlighten me more on how to open an header file and  Defining a Class with a Member Function. thankz. after i deggued this function displayMessage,
  // create a GradeBook object, and call its displayMessage function.
  #include <iostream>
 using std::cout;
 using std::endl;
 // GradeBook class definition                                       
 class GradeBook                                                     
 {                                                                   
 public:                                                             
   // function that displays a welcome message to the GradeBook user
  void displayMessage()                                           
    {                                                               
       cout << ”Welcome to the Grade Book!” << endl;                 
    } // end function displayMessage                                 
}; // end class GradeBook                                           

 // function main begins program execution
 int main()
 {
    GradeBook myGradeBook; // create a GradeBook object named myGradeBook
   myGradeBook.displayMessage(); // call object's displayMessage function
    return 0; // indicate successful termination
 } // end main
 
 it wrote


1>------ Build started: Project: gradebooked, Configuration: Debug Win32 ------
1>Compiling,
1>gradebooked.cpp
1>c:\users\pensure\documents\visual studio 2005\projects\game\game\gradebooked\gradebooked\gradebooked.cpp(1) : error C2146: syntax error : missing ';' before identifier 'displayMessage'
1>c:\users\pensure\documents\visual studio 2005\projects\game\game\gradebooked\gradebooked\gradebooked.cpp(1) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\pensure\documents\visual studio 2005\projects\game\game\gradebooked\gradebooked\gradebooked.cpp(1) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft visual studio 8\vc\include\sal.h(226) : error C2059: syntax error : 'extern '
1>c:\program files\microsoft visual studio 8\vc\include\sal.h(226) : error C2143: syntax error : missing ';' before '{'
1>c:\program files\microsoft visual studio 8\vc\include\sal.h(226) : error C2447: '{' : missing function header (old-style formal list?)
1>c:\users\pensure\documents\visual studio 2005\projects\game\game\gradebooked\gradebooked\gradebooked.cpp(13) : error C2065: '”Welcome' : undeclared identifier
1>c:\users\pensure\documents\visual studio 2005\projects\game\game\gradebooked\gradebooked\gradebooked.cpp(13) : error C2146: syntax error : missing ';' before identifier 'to'
1>c:\users\pensure\documents\visual studio 2005\projects\game\game\gradebooked\gradebooked\gradebooked.cpp(13) : error C2065: 'to' : undeclared identifier
1>c:\users\pensure\documents\visual studio 2005\projects\game\game\gradebooked\gradebooked\gradebooked.cpp(13) : error C2146: syntax error : missing ';' before identifier 'the'
1>c:\users\pensure\documents\visual studio 2005\projects\game\game\gradebooked\gradebooked\gradebooked.cpp(13) : error C2065: 'the' : undeclared identifier
1>c:\users\pensure\documents\visual studio 2005\projects\game\game\gradebooked\gradebooked\gradebooked.cpp(13) : error C2146: syntax error : missing ';' before identifier 'Grade'
1>c:\users\pensure\documents\visual studio 2005\projects\game\game\gradebooked\gradebooked\gradebooked.cpp(13) : error C2065: 'Grade' : undeclared identifier
1>c:\users\pensure\documents\visual studio 2005\projects\game\game\gradebooked\gradebooked\gradebooked.cpp(13) : error C2146: syntax error : missing ';' before identifier 'Book'
1>c:\users\pensure\documents\visual studio 2005\projects\game\game\gradebooked\gradebooked\gradebooked.cpp(13) : error C2065: 'Book' : undeclared identifier
1>c:\users\pensure\documents\visual studio 2005\projects\game\game\gradebooked\gradebooked\gradebooked.cpp(13) : error C2143: syntax error : missing ';' before '!'
1>c:\users\pensure\documents\visual studio 2005\projects\game\game\gradebooked\gradebooked\gradebooked.cpp(13) : error C2065: '”' : undeclared identifier
1>c:\users\pensure\documents\visual studio 2005\projects\game\game\gradebooked\gradebooked\gradebooked.cpp(13) : error C2563: mismatch in formal parameter list
1>c:\users\pensure\documents\visual studio 2005\projects\game\game\gradebooked\gradebooked\gradebooked.cpp(13) : error C2568: '<<' : unable to resolve function overload
1>        c:\program files\microsoft visual studio 8\vc\include\ostream(937): could be 'std::basic_ostream<_Elem,_Traits> &std::endl(std::basic_ostream<_Elem,_Traits> &)'
1>        c:\program files\microsoft visual studio 8\vc\include\ostream(963): or 'std::basic_ostream<_Elem,_Traits> &std::endl(std::basic_ostream<_Elem,_Traits> &)'
1>        with
1>        [
1>            _Elem=char,
1>            _Traits=std::char_traits<char>
1>        ]
1>        c:\program files\microsoft visual studio 8\vc\include\ostream(971): or 'std::basic_ostream<_Elem,_Traits> &std::endl(std::basic_ostream<_Elem,_Traits> &)'
1>        with
1>        [
1>            _Elem=wchar_t,
1>            _Traits=std::char_traits<wchar_t>
1>        ]
1>Build log was saved at "file://c:\Users\pensure\Documents\Visual Studio 2005\Projects\game\game\gradebooked\gradebooked\Debug\BuildLog.htm"
1>gradebooked - 19 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========




 Give Me Some Help!  Fairly Used Dell Laptop For Sale  Help Us Decide: Language / Platform For Hospital System  Page 2
Pages: (1) Go Up Send Topic to Friend by E-mail Reply 


Sections: Autos/Cars (2) Jobs/Vacancies (2) (3) Career Talk Education General(2) Politics Romance Computers Phones Travel
Sports Fashion Health Religion Celebrities TV/Movies (2) Music/Radio (2) Books Webmasters Programming

Links: Page1 Page2 Page3 Page4 Page5 Page6 Page7 Page8 Page9 Page10

Nairaland is owned by Oluwaseun Osewa. See also: Nairalist Classified Ads
Nairaland Forum | Powered by SMF 1.0.12.
© 2001-2005, Lewis Media. All Rights Reserved.