Click here to Skip to main content
15,902,817 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: how to read the CD_ROM sectors Pin
John M. Drescher16-Feb-04 15:46
John M. Drescher16-Feb-04 15:46 
GeneralRe: how to read the CD_ROM sectors Pin
longdafeng16-Feb-04 16:04
longdafeng16-Feb-04 16:04 
GeneralRe: how to read the CD_ROM sectors - EDITED Pin
John M. Drescher16-Feb-04 16:07
John M. Drescher16-Feb-04 16:07 
GeneralRe: how to read the CD_ROM sectors Pin
John M. Drescher16-Feb-04 16:28
John M. Drescher16-Feb-04 16:28 
GeneralRe: how to read the CD_ROM sectors Pin
longdafeng16-Feb-04 16:47
longdafeng16-Feb-04 16:47 
GeneralConstraining CWnd size Pin
garycage16-Feb-04 14:52
garycage16-Feb-04 14:52 
GeneralRe: Constraining CWnd size Pin
John M. Drescher16-Feb-04 16:01
John M. Drescher16-Feb-04 16:01 
Generalproblems with static members Pin
Ylis16-Feb-04 12:32
Ylis16-Feb-04 12:32 
I'm having some trouble with static members in my program. This is what my code looks like:
<br />
#ifndef TIMER_H<br />
#define TIMER_H<br />
class Timer<br />
{<br />
private:<br />
	static LARGE_INTEGER m_lTicksPerSecond;<br />
	static LARGE_INTEGER m_lTime;<br />
	static LARGE_INTEGER m_lFirstTime;<br />
	Timer();<br />
public:<br />
	static bool Initialize()<br />
	{<br />
		if(QueryPerformanceFrequency(&m_lTicksPerSecond) && QueryPerformanceCounter(&m_lFirstTime))<br />
			return true;<br />
		return false;<br />
	}<br />
	static double MsSinceStart()<br />
	{<br />
		QueryPerformanceCounter(&m_lTime);<br />
		return ((double)(m_lTime.QuadPart - m_lFirstTime.QuadPart ) / (double)m_lTicksPerSecond.QuadPart ) * 1000.0;<br />
	}<br />
};<br />
#endif<br />

Or you can check it out at http://www.rafb.net/paste/results/SD400728.html (don't know if codeproject supports the formating).
Anyway, the error I'm geting is:
error LNK2001: unresolved external symbol "private: static union _LARGE_INTEGER Timer::m_lFirstTime" (?m_lFirstTime@Timer@@0T_LARGE_INTEGER@@A) on every member. The program it self is a win32 application.

Grateful for any help Wink | ;)
GeneralRe: problems with static members Pin
Robert A. T. Káldy16-Feb-04 13:08
Robert A. T. Káldy16-Feb-04 13:08 
GeneralRe: problems with static members Pin
Ylis16-Feb-04 13:27
Ylis16-Feb-04 13:27 
GeneralRe: problems with static members Pin
John M. Drescher16-Feb-04 13:17
John M. Drescher16-Feb-04 13:17 
GeneralRe: problems with static members Pin
Ylis16-Feb-04 13:53
Ylis16-Feb-04 13:53 
GeneralRe: problems with static members Pin
John M. Drescher16-Feb-04 16:26
John M. Drescher16-Feb-04 16:26 
GeneralRe: problems with static members Pin
Robert A. T. Káldy17-Feb-04 0:31
Robert A. T. Káldy17-Feb-04 0:31 
Generalif-Statement getting me crazy Pin
User 665816-Feb-04 11:28
User 665816-Feb-04 11:28 
GeneralRe: if-Statement getting me crazy Pin
Christian Graus16-Feb-04 11:36
protectorChristian Graus16-Feb-04 11:36 
GeneralRe: if-Statement getting me crazy Pin
John M. Drescher16-Feb-04 11:43
John M. Drescher16-Feb-04 11:43 
GeneralRe: if-Statement getting me crazy Pin
Christian Graus16-Feb-04 11:46
protectorChristian Graus16-Feb-04 11:46 
GeneralRe: if-Statement getting me crazy Pin
User 665816-Feb-04 11:48
User 665816-Feb-04 11:48 
GeneralRe: if-Statement getting me crazy Pin
Andy Brummer16-Feb-04 11:49
sitebuilderAndy Brummer16-Feb-04 11:49 
GeneralRe: if-Statement getting me crazy Pin
Maxwell Chen16-Feb-04 18:09
Maxwell Chen16-Feb-04 18:09 
General[OT]: 2 new questions Pin
User 665816-Feb-04 12:06
User 665816-Feb-04 12:06 
GeneralRe: [OT]: 2 new questions Pin
Christian Graus16-Feb-04 12:45
protectorChristian Graus16-Feb-04 12:45 
GeneralRe: if-Statement getting me crazy Pin
Toni7816-Feb-04 15:23
Toni7816-Feb-04 15:23 
GeneralRe: if-Statement getting me crazy Pin
Maxwell Chen16-Feb-04 18:02
Maxwell Chen16-Feb-04 18:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.