Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Warnings in Visual C++6

Status
Not open for further replies.

protomor

Programmer
Oct 6, 2001
1
US
C:\My Documents\programs\Deskpet\main.cpp(165) : warning C4101: 'buffer' : unreferenced local variable
C:\My Documents\programs\Deskpet\main.cpp(250) : warning C4101: 'hdc' : unreferenced local variable

thats the warnings I always get when making a winapi program. I know what they are but how do I make them go away, I dont like warnings
 
Hmm, well, why not remove the definition of 'buffer' from line 165 of main.cpp and the definition of 'hdc' from line 250?

Or put in a #pragma warning(disable:4101)
:) I just can't help it, I like MS...:)
 
hi, there are some macros called UNREFERENCED_PARAMETER, etc... defined in winnt.h
you can use those, or just define something similar in your project. or swich warking level to 3 :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top