Mail Archives: djgpp/1999/11/23/00:04:38
Heya
I haven't used the C++ part, but I use C a lot and usually GPP says "file.c:
line: blablabla" if it's an error, and "file.c: line: warning: blablabla" if it's
a warning, so those are definitely errors (I think ;).
Try taking the variable declaration out of the loop and placing it before...
Something like...
int i;
for (i = 0; i < whatever; i ++)
(I don't have the original source on me, so this'll have to do... ;)
And compile and see what happens...
I don't know why the variable declaration wouldn't work inside the loop, but I
have a funny feeling about it...
- Michael
Rodeo Red wrote:
> Peter Danielsson wrote:
>
> > They are only warnings and should compile anyway.
>
> The plot thickens.
> Here is the exact command I used to try to compile
>
> C:\djgpp\Source>gpp testfile.cpp -o testfile.exe
> testfile.cpp: In function `int main(...)':
> testfile.cpp:25: name lookup of `i' changed for new ANSI `for' scoping
> testfile.cpp:19: using obsolete binding at `i'
>
> There's no testfile.exe. As far as I know, that means it didn't compile. What
> would make this happen ?
> is the problem with the code ? or are my djfpp files corrupted ?
>
> Red
- Raw text -