warning msg for me

Go down

warning msg for me

Post by ARVINTH B.J on 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

View user profile

Back to top Go down

Re: warning msg for me

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

upload the entire code and error report.
avatar
Christopher
Admin

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

View user profile http://unixcpp.forumotion.com

Back to top Go down

Re: warning msg for me

Post by crack2drop on 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 : 30
Location : Chennai

View user profile

Back to top Go down

warning msg for me

Post by naga rishi on 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 : 30
Location : KOLKATA

View user profile

Back to top Go down

Re: warning msg for me

Post by Christopher on 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.
avatar
Christopher
Admin

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

View user profile http://unixcpp.forumotion.com

Back to top Go down

Re: warning msg for me

Post by Vineet_More on 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

View user profile

Back to top Go down

Re: warning msg for me

Post by naga rishi on 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 : 30
Location : KOLKATA

View user profile

Back to top Go down

Re: warning msg for me

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

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