Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3.  
  4. class Hello{
  5. private:
  6.     std::string hello;
  7. public:
  8.     Hello();
  9.  
  10.     void sentence();
  11. };
  12.  
  13. Hello::Hello(){
  14.     this->hello = "Hello World!";
  15. }
  16.  
  17. void Hello::sentence(){
  18.     std::cout << this->hello;
  19. }
  20.  
  21. int main()
  22. {
  23.     //std::cout << "Hello World!";
  24.     Hello test;
  25.     test.sentence();
  26.     return 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement