Mail Archives: djgpp/1997/02/03/15:08:32
Pyro Technic wrote:
>
> My prog is a stupid little prog for a math problem. It's due in 14
> hours. I need help bad.The prog, B low, compiles w/ just 1 warning
>
> D:\PROGS>gxx -o TOG.exe TOG#2.cpp
> TOG#2.cpp: In function `int main(...)':
> TOG#2.cpp:30: warning: implicit declaration of function `int getch(...)'
> for(j=3; j>=0; ++j)
^ shouldn't it be --j?
otherwise I would say that this is an
endless loop, no? (j grows allways, so it is allways bigger than
0)
> {
> temp = (int)num1 % 10;
> digit[j]=temp;
> num1 /= 10;
> num1 -= (temp/10);
> }
To get rid of the warning I think you must include stdio.h this way:
#include <stdio.h>
Hope this helps!
- Raw text -