Advertisement

Class scope variables arn't retaining their values?

Started by July 30, 2000 12:14 AM
-1 comments, last by gimp 24 years, 4 months ago
I have a class CMutex which I can create and use by itself without problem. But when created in CQueue as follows:
    
class CQueue 
{
public:
	CQueue();
	~CQueue();

	byte *Get();
	void Put(byte *data);
	const Boolean IsEmpty(void);
private:
	typedef deque<byte*> MessageQueueDeque;
	MessageQueueDeque itsMessageQueue;
	CMutex Mutex;
};
    
The CMutex doesn''t seem to be able to keep it''s member variable? class CMutex { public: CMutex(); ~CMutex(); void Lock(); void Lock(const int Timeout); void Unlock(void); private: SYS_HANDLE hMutex; }; The handle seems to work fine when I create the mutex and gets assigned some kind of address. But when I subsequently call Lock() (Wait for single object) Now hMutex no longer equals anything?(cdcdcdcd) How did my class loose it''s variable? Many thanks gimp
Chris Brodie

This topic is closed to new replies.

Advertisement