By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,750 Members | 1,187 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,750 IT Pros & Developers. It's quick & easy.

more warnings

P: n/a
hi, all, how to deal with such warnings?

' ' declared 'static' but never defined

in my opinion, since the variable is not defined, can I directly delete
the variable to quiet the warning?

Thanks all.

Jun 26 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
asdf <li*********@gmail.com> wrote:
hi, all, how to deal with such warnings?

' ' declared 'static' but never defined

in my opinion, since the variable is not defined, can I directly delete
the variable to quiet the warning?


If you never use the variable anywhere, then you can delete it.
However, more likely, it has been declared but not defined, but it is
being used, in which case you must define it somewhere (usually in a
..cpp file).

For example:

class C {
public:
// declaration
static int Num;
};

// definition
int C::Num = 0;

--
Marcus Kwok
Replace 'invalid' with 'net' to reply
Jun 26 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.