fork download
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6. class Employee
  7. {
  8. public:
  9.  
  10. Employee(const std::string& name)
  11. : myName(name)
  12. {
  13. }
  14.  
  15. void disp(){cout<< myName;}
  16.  
  17. private:
  18. std::string myName;
  19. };
  20.  
  21.  
  22.  
  23.  
  24. int main()
  25. {
  26. Employee emp("check");
  27. emp.disp();
  28. return(0);
  29. }
Success #stdin #stdout 0s 3472KB
stdin
Standard input is empty
stdout
check