(1) Put both main() functions into a new file.
(2) Rename both main() functions to something appropriate.
(3) Write a new main() function to call the two functions in whatever order you see fit.

Saswat is talking about this line of code:
Code:
  return main();
This is wrong. I don't know where you got the idea that you should include the function name in a return statement. A return statement should return no value at all, i.e.
Code:
  return;
OR should return some suitable value:
Code:
int func() // returns an integer
{
  int x;
  // ...some code that calculates x...
  return x;
}
A return statement isn't necessary at the end of a function as the function will return once it hits the closing brace anyway:
Code:
void func()
{
  // ...some code...
  return; // this line is pointless

  // (unless it was a conditional return, and you have more code here)
}
shizzle08 like this