Unix C++
Would you like to react to this message? Create an account in a few clicks or log in to continue.

warning msg for me

5 posters

Go down

warning msg for me Empty warning msg for me

Post by ARVINTH B.J Fri Feb 26, 2010 6:32 pm

the compiler shows a warning at line no 32 where the whole prgm is only abt 29 lines.wht to do

ARVINTH B.J

Posts : 20
Points : 31
Join date : 2010-02-26

Back to top Go down

warning msg for me Empty Re: warning msg for me

Post by Christopher Fri Feb 26, 2010 6:52 pm

upload the entire code and error report.
Christopher
Christopher
Admin

Posts : 240
Points : 429
Join date : 2010-02-26
Age : 35

https://unixcpp.forumotion.com

Back to top Go down

warning msg for me Empty Re: warning msg for me

Post by crack2drop Wed Mar 03, 2010 5:56 pm

open a new file and recompile it in a fresh file

crack2drop

Posts : 4
Points : 4
Join date : 2010-03-03
Age : 36
Location : Chennai

Back to top Go down

warning msg for me Empty warning msg for me

Post by naga rishi Tue Mar 09, 2010 6:11 pm

When referring to the number of lines of the code, it is not the actual lines present in your program. rather it is the total count of the lines including the loop iterations and goto jumps. so, for a two line program you could get infinite number of lines of code.

eg: int main{ for( ; ; );
return 0;}

naga rishi

Posts : 8
Points : 3
Join date : 2010-03-08
Age : 35
Location : KOLKATA

Back to top Go down

warning msg for me Empty Re: warning msg for me

Post by Christopher Tue Mar 09, 2010 6:26 pm

No. Compiler only checks for correctness of the pgm. It doesn't know anything about iterations. When it shows error on a particular line, it means the actual line number not the number of times it s executed.
Christopher
Christopher
Admin

Posts : 240
Points : 429
Join date : 2010-02-26
Age : 35

https://unixcpp.forumotion.com

Back to top Go down

warning msg for me Empty Re: warning msg for me

Post by Vineet_More Tue Mar 09, 2010 6:32 pm

@christopher
Yes it is correct
and moreover
@:naga rishi

The Compiler Never has any counter kind of thing which will count the number of iterations and increment it. It is basically comprises of states and on each iteration its the state which changes if necessary. So according to me there is no concept of showing different line numbers then to actual line number of your program code.

Vineet_More

Posts : 27
Points : 31
Join date : 2010-02-26

Back to top Go down

warning msg for me Empty Re: warning msg for me

Post by naga rishi Thu Mar 25, 2010 4:59 pm

Yeah I see that now. Thank You... But i have one more doubt. Whenever i compile a program in TURBO C compiler (in windows platform) it shows more number of lines than present in the code. So how can it be explained. (a loop is present in the program)

naga rishi

Posts : 8
Points : 3
Join date : 2010-03-08
Age : 35
Location : KOLKATA

Back to top Go down

warning msg for me Empty Re: warning msg for me

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum