i have a function that initiates the engine for my project, and i want to put everything that deals with initiating the project in it. that includes the variables. its not a big deal if i can't do it, because there really isn't a big need to do it. i just think it will make the code cleaner. is there a way that i could do something like this:
PHP Code:
void init()
{
int p = 10;
}
int main()
{
init();
cout << p;
return 0;
}