C++ modifying variables from outside main()
i was wondering how to modify the following to make the loop end without using "return".
in otherwords im asking how to use "meow()" to directly edit "main()"s int1
in otherwords im asking how to use "meow()" to directly edit "main()"s int1
Code:
void meow(int int1)
{
int1 += 10;
cout << int1 << endl;
}
int main()
{
int int1 = 5;
while(int1 < 100)
{
meow(int1);
}
system("pause");
return 0;
}
