Skip to content

Instantly share code, notes, and snippets.

@DimensionalScoop
Created July 20, 2014 14:27
Show Gist options
  • Save DimensionalScoop/705e24210fc09cfacbee to your computer and use it in GitHub Desktop.
Save DimensionalScoop/705e24210fc09cfacbee to your computer and use it in GitHub Desktop.
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;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment