+ 2
Can i call a function inside the for loop??
for making graphic program
3 Respuestas
+ 11
Yes. But it is more common to use a while loop for a program that should only exit on user action.
+ 1
well, if a lot has to be done, you can use a function. makes the loop more easy to read. I don't think it had anything to do with exiting our not...
+ 1
for example
void func(int x)
{
cout<<i;
}
void main(){
for (int i=0;i<max;i++)
{
func(i);
}
}