I am just learning C by starting on modifying an example program to do what I want it to do. But immediately get warning messages although the compiled program runs fine. Whenever I declare a variable I get the following warnings.
Measure.c(153): warning: #550-D: variable "Minn_flag" was set but never used Measure.c(62): warning: #550-D: variable "Ret_flags" was set but never used
Ret_Flags is declare as a global at the head of a file, and used in two functions. Minn_flag is declared inside a function and used once. I dont understand because I am declaring and using variables right alongside others already used in the example. Those variables dont get errors, but mine do. I am sure it's basic but what am I doing wrong?
Thanks!
OK here's another one how can I comment chunks of C code out that I don't want compiled right now inside a function? I tried /* ..... */ But the existing comments stop that working. // on each line works but thats a pain #IF 0 ..... #ENDIF doesn't work, is there a trick or do I have to cut/copy into Notepad for instance?
Why doesn't #if 0 work? If you're using #IF try lower case.
Some editors have a feature to put comments in front of all selected line (in Visual Studio it's ctrl-k-c).
You might want to start new threads for different questions to get more response.
Regards, Joost
"the Forum is the only place I can ask"
Try this: http://c-faq.com/
Yep, "this Forum is the only place I can ask" Right, and the only place where we get whole chunk of programs
"I cannot write your programs for you.?"