Click here to Skip to main content
15,917,610 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to power-off computer on Win9x? Pin
Abin16-Feb-04 22:28
Abin16-Feb-04 22:28 
AnswerRe: How to power-off computer on Win9x? Pin
Selvam R16-Feb-04 22:38
professionalSelvam R16-Feb-04 22:38 
QuestionHow can detect the vendor of Audio Codec ? Pin
HansonDavid16-Feb-04 17:40
HansonDavid16-Feb-04 17:40 
GeneralVisual Studio.NET 2003 Pin
Gagnon Claude16-Feb-04 17:25
Gagnon Claude16-Feb-04 17:25 
GeneralRe: Visual Studio.NET 2003 Pin
Selvam R16-Feb-04 21:02
professionalSelvam R16-Feb-04 21:02 
GeneralHelp! for access the parallel port Pin
jfk_lili16-Feb-04 16:55
jfk_lili16-Feb-04 16:55 
GeneralRe: Help! for access the parallel port Pin
John M. Drescher16-Feb-04 17:05
John M. Drescher16-Feb-04 17:05 
GeneralRe: Help! for access the parallel port Pin
John M. Drescher16-Feb-04 17:09
John M. Drescher16-Feb-04 17:09 
GeneralRe: Help! for access the parallel port Pin
Andrew Walker16-Feb-04 19:49
Andrew Walker16-Feb-04 19:49 
Questionhow to read the CD_ROM sectors Pin
longdafeng16-Feb-04 15:15
longdafeng16-Feb-04 15:15 
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 

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.