Advertisement
bhok

Class declaration Question 1

Dec 13th, 2017
73
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.  
  3. class Sandman
  4. {
  5. public:
  6.     Sandman(int time = 5);
  7. private:
  8.     int time_;
  9. };
  10.  
  11. Sandman::Sandman(int time) : time_(time)
  12. {
  13.     std::cout << time_;
  14. }
  15.  
  16. int main()
  17.  
  18. {
  19.     Which option is incorrect?
  20.  
  21.     //Sandman firstObj;
  22.     //Sandman firstObj2(10);
  23.     //Sandman();
  24.    
  25.     // All of the above?
  26.  
  27.     system("pause");
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement