Advertisement
Guest User

Untitled

a guest
Feb 10th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. class problem
  4. {
  5. public:
  6. problem(int val) : m_val(val) { }
  7.  
  8. void debug()
  9. {
  10. std::cout << "debug" << std::endl;
  11. }
  12.  
  13. void trace()
  14. {
  15. std::cout << "val: " << m_val << std::endl;
  16. }
  17.  
  18. private:
  19. int m_val;
  20. };
  21.  
  22. int main()
  23. {
  24. problem* proml = nullptr;
  25. try {
  26. proml->debug();
  27. }
  28. catch(...) {
  29. std::cout << "bad call" << std::endl;
  30. }
  31. return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement