Guest User

Untitled

a guest
Jan 3rd, 2019
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. class Sandwich {
  6.     string sand;
  7. public:
  8.     int MakeMeOne(string);
  9.     int EatIt();
  10. };
  11.  
  12. int main () {
  13.     string x;
  14.     cout << "What do you want your sandwich to taste like?" << endl;
  15.     cin >> x;
  16.     Sandwich Sandvich;
  17.     Sandvich.MakeMeOne(x);
  18.     x = Sandvich.EatIt();
  19.     cout << "That was one " << x << " sandwich!";
  20.     return 0;
  21. }
  22. Sandwich::MakeMeOne(string numster){
  23.     sand = numster;
  24.     return 0;
  25. }
  26. Sandwich::EatIt(){
  27.     return sand;
  28. }
Add Comment
Please, Sign In to add comment