DimensionalScoop
7/20/2014 - 2:27 PM

Intuitive Software Development in C++

Intuitive Software Development in C++

#include <iostream>

class Ball
{
public:
    Ball()
    {
        std::cout << "Throwing Ball!\n";
    }
};

int main(int argc, char* argv[])
{
    try
    {
        throw Ball();
    }
    catch (Ball)
    {
        std::cout << "caught!";
    }
    std::cin.get();
    return 0;
}