Where is the static variable and what is the error message you get?
Helpful links:
How To Ask Questions The Smart Way | Google can help with your question | Search MSDN for help with standard C or Windows functions
Helpful links:
How To Ask Questions The Smart Way | Google can help with your question | Search MSDN for help with standard C or Windows functions
If m_startTime is an instance variable of a class, and you haven''t created any instances of that class, then that wouldn''t work.
Remember, in class member funcs m_startTime is shorthand for this->m_startTime.
Remember, in class member funcs m_startTime is shorthand for this->m_startTime.
We need to see the context, so post some code like Pipo DeClown suggests. Also, we need to know how it "doesn''t work," so (assuming that compiler/linker errors are the problem) cite the relevant error messages.
If it is inside a function, then it only get initialized once in the first call, and subsequent call to the function doesn''t get initialized.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement