Archived

This topic is now archived and is closed to further replies.

headshot

unreferenced local?

Recommended Posts

VC++ gives me and warning when i compile, it says this is an unreferenced local var? char buffer[80]; // general printing buffer i''ve just goten back into coding after a few months so maby i forgot something, but it looks fine to me?

Share this post


Link to post
Share on other sites
This error means that you declared buffer, but then never used it for anything. That''s all it means. Why would you declare it, but never reference it in your code?


How appropriate. You fight like a cow.

Share this post


Link to post
Share on other sites
The compiler is just telling you to use it.
If youre not going to use it then assigning a value to it for the time being will get rid of the warning for now .. but then so will commenting it out.

edit: Wow you guys were quick.

[edited by - Tiffany_Smith on July 28, 2003 2:12:40 PM]

Share this post


Link to post
Share on other sites
quote:
Original post by Sneftel
Why would you declare it, but never reference it in your code?


it''s code from "tricks of the windows..." i just modifyed it a little, but the code he rote was intended as a shell, so i gess it''s understandibal that he would not use it all:D

Share this post


Link to post
Share on other sites