hello,
i need to slow down the output in a recursive function. but, i have no idea
hello,
i need to slow down the output in a recursive function. but, i have no idea
Try using something like sleep()
>> i need to slow down the output in a recursive function. but, i have no idea
Could you... be more specific... because.. I have no idea
Better questions get better answers, yours is too vague IMO.
No No's:
fflush (stdin); gets (); void main ();
Goodies:
Example of fgets (); The FAQ, C/C++ Reference
My Gear:
OS - Windows XP
IDE - MS Visual C++ 2008 Express Edition
ASCII stupid question, get a stupid ANSI
Use another recursive function to eat up time between outputs!You can never have too much recursion!Code:void fun1( size_t x ) { if( x ) fun1( x - 1 ); } void fun2( size_t y ) { if( y ) { output( y ); fun1( delay ); fun2( y - 1 ); } }
Quzah.
Hope is the first step on the road to disappointment.