yeah you setup prototypes before and outside of the main function. You can define them after, or you can define them in the prototype like this:
Code:
#include <iostream>
using namespace std;
void age()
{
....whatever age does...
}; <---Just remember that ; in the prototype!
int main()
{
age();
return 0;
}
or you could do it like this:
Code:
#include <iostream>
using namespace std;
void age();
int main()
{
age();
return 0;
}
void age()
{
...whatever age does...
} <------No semicolon when you define a function after but always put one in the prototype
Good luck!
EDIT: You dont need the
stuff. Just:
will do. And always remember to return a value for main.
Code:
int main()
{
age();
greetings();
return 0;
}
--or you can do--
Code:
int main()
{
age();
greetings();
cin.get()
}