Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using std::cout;
- using std::cin;
- using std::endl;
- #include <string>
- using std::string;
- using std::getline;
- class GradeBook
- {
- public:
- void displayMessage( string className )
- {
- cout << "Weclome to the Grade Book of " << className << endl;
- }
- };
- int main()
- {
- GradeBook myGradeBook;
- string nameOfClass;
- cout << "Write your name class: " << nameOfClass << endl;
- getline( cin, nameOfClass );
- cout << endl;
- myGradeBook.displayMessage( nameOfClass );
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement