
kind of:
int funkydiv (int a, int b) {
if(b == 0) return MAX; else return a/b;
}
so long as you make sure it's distinguished from the built-in int type. also, i don't know what c's like for overloading operators, but it'd be a piece of piss to overload the division operator in c++
( ,
Sun 6 Jul 2008, 13:22,
archived)
int funkydiv (int a, int b) {
if(b == 0) return MAX; else return a/b;
}
so long as you make sure it's distinguished from the built-in int type. also, i don't know what c's like for overloading operators, but it'd be a piece of piss to overload the division operator in c++