Advertisement
Need4Sleep

main.cpp (DailyC++) 7/23/12

Jul 23rd, 2012
464
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.38 KB | None | 0 0
  1. /// http://www.cplusplus.com/forum/beginner/75558/
  2. #include <iostream>
  3. #include "myArray.h"
  4. #include <cstdlib>
  5.  
  6. int main()
  7. {
  8.     try                         //TRY BLOCK
  9.     {
  10.         myArray<int> mObj(3);
  11.         std::cout << mObj;
  12.  
  13.         std::cout << mObj[5];
  14.     }
  15.     catch(std::string std)      //CATCH ERROR
  16.     {
  17.         std::cout << std << std::endl;
  18.     }
  19.  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement