Not to be nit-picky, but void really don't have a "return".
And since maxInt never really had an input, perhaps there should
be two functions since maxInt just checks the comparisons.
bool maxInt(int, int, int&)
{
...return true if x and y have a diffrence...
}
void printInt(int x, int y, int big)
{
if(x == -9999) { ...set kill signal... }
bool difference = maxInt(x, y, big);
if(!diffrence) { cout << "They were the same" << endl; }
else
{
cout << "Big is: " << big << endl;
}
}
I suppose it doesn't matter if you have it all in one function or not. Personal preference in design.
Last edited by MosaicFuneral; Dec 7th, 2008 at 3:52 am.
Reputation Points: 888
Solved Threads: 114
Nearly a Posting Virtuoso
Offline 1,270 posts
since Nov 2008