Ok you win.
Type: Posts; User: CommonTater
Ok you win.
From Post #5.... Top line...
"Try it like below.... The problem is that you were testing ch before it had any legitmate value assigned..."
Now as I see it he has 3 choices here...
1)...
That is ONE way to fix the problem. There was no intervening code and nothing else that would be affected by the solution I offered so I see no harm in it.
I STILL don't understand why you think...
I know... sorry about that... but I don't have much tolerance for being blamed for stuff I didn't/wouldn't say or do.
Ok, then... if you are finding fault with iMalc... don't quote me.
GEES
Ok... one more time for clarity...
1) I did not, would not and will not say the loop was the problem.
2) No the loop was not the problem.
3) The problem he had was not the loop.
4) The loop...
That's right.
It didn't work because the first time he tested ch it was not intialized with any valid value.
Changing the loop was how I chose to fix the problem.
And yes he could have...
Yep. By changing the loop so ch is assigned before it's tested we eliminated the problem.
Try it like below.... The problem is that you were testing ch before it had any legitmate value assigned...
#include <stdio.h>
int main()
{
char ch;