Hi ,my solution for this problem is getting MLE .Can you give me any advises how to lessen memory use .
And also i have one question: how can i initialize global variable in main() function that i could use this variable in every other function (like this) :
void foo(void)
{
cout<<x<<endl;
x+=5;
}
int main()
{
int x=5;
foo();
return 0;
}
Of course this program gets Compilation error.
Thanks in advance ^_^ . (sorry for my bad English)
Well, you can initialize global variable in main(), but it seems that you can't declare global variable in main function.