• Advertisement

Archived

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

unreferenced local?

This topic is 5324 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
Since it is a warning I am guessing that it is just informing you that buffer was declared but never accessed/used/referenced.

Share this post


Link to post
Share on other sites
does it just want to be set to NULL or something?(yes i know it''s an array)
is it something to worry about(i''m a little warry of warnings)

Share this post


Link to post
Share on other sites
Nah if it really is never being used you might as well just comment it out untill it is needed.

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

  • Advertisement