Click here to Skip to main content
16,008,075 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralThread Message Pin
Hesham Amin9-May-02 23:02
Hesham Amin9-May-02 23:02 
GeneralRe: Thread Message Pin
jan larsen9-May-02 23:40
jan larsen9-May-02 23:40 
GeneralRe: Thread Message Pin
Hesham Amin10-May-02 1:58
Hesham Amin10-May-02 1:58 
GeneralRe: Thread Message Pin
Philip Patrick9-May-02 23:49
professionalPhilip Patrick9-May-02 23:49 
GeneralRe: Thread Message Pin
Hesham Amin10-May-02 1:56
Hesham Amin10-May-02 1:56 
GeneralYou are welcome Pin
Philip Patrick10-May-02 3:20
professionalPhilip Patrick10-May-02 3:20 
Generala simple c++ question about operator= Pin
denkor9-May-02 22:55
denkor9-May-02 22:55 
GeneralRe: a simple c++ question about operator= Pin
Maxwell Chen9-May-02 23:06
Maxwell Chen9-May-02 23:06 
I just wrote a non-MFC code (actually a console one) to demonstrate operator overloading for you ...

#include <iostreamᡊe9ac73-238b-46be-991d-0f050c37248d
using namespace std;

class Base
{
protected:
	static int _iIndex;
	static Base* _pAddress;

	int _iId;
	Base* _pPrev;

public:
	Base() {
		_iId = ++_iIndex;
		_pPrev = _pAddress;
		_pAddress = this;
	}

	Base& operator==(Base& ref) {
		ref._pPrev = this;
		return *this;
	}

	int Bomb() {
		cout << _iId << " -> ";
		_sleep(500);
		if(!_pPrev) {
			cout << "\nChain broken!\n";
			return 1;
		}
		return _pPrev->Bomb();
	}
};

int Base::_iIndex = 0;
Base* Base::_pAddress = 0;

int main()
{
	Base a[20];

	a[19] == a[0];
	return a[19].Bomb();
}




Maxwell Chen
People say "No news is good news". Then, no code is good code!?
GeneralRe: a simple c++ question about operator= Pin
Christian Graus9-May-02 23:07
protectorChristian Graus9-May-02 23:07 
GeneralRe: a simple c++ question about operator= Pin
Maxwell Chen9-May-02 23:16
Maxwell Chen9-May-02 23:16 
GeneralRe: a simple c++ question about operator= Pin
Niklas L12-May-02 21:54
Niklas L12-May-02 21:54 
GeneralAnd copy constructor issue...... Pin
Maxwell Chen9-May-02 23:11
Maxwell Chen9-May-02 23:11 
GeneralThank you ,Maxwell Chen and Christian Graus ! Pin
denkor10-May-02 0:48
denkor10-May-02 0:48 
GeneralRe: Thank you ,Maxwell Chen and Christian Graus ! Pin
Maxwell Chen10-May-02 0:54
Maxwell Chen10-May-02 0:54 
QuestionHow to hide and/or disable PropertyPage Pin
Eugene Pustovoyt9-May-02 22:07
Eugene Pustovoyt9-May-02 22:07 
AnswerRe: How to hide and/or disable PropertyPage Pin
Tom Archer9-May-02 22:28
Tom Archer9-May-02 22:28 
GeneralRe: How to hide and/or disable PropertyPage Pin
Eugene Pustovoyt9-May-02 23:56
Eugene Pustovoyt9-May-02 23:56 
GeneralRe: How to hide and/or disable PropertyPage Pin
Tom Archer10-May-02 5:45
Tom Archer10-May-02 5:45 
GeneralRe: How to hide and/or disable PropertyPage Pin
Eugene Pustovoyt10-May-02 7:02
Eugene Pustovoyt10-May-02 7:02 
GeneralRe: How to hide and/or disable PropertyPage Pin
Tom Archer10-May-02 7:08
Tom Archer10-May-02 7:08 
GeneralRe: How to hide and/or disable PropertyPage Pin
Eugene Pustovoyt10-May-02 7:58
Eugene Pustovoyt10-May-02 7:58 
GeneralRe: How to hide and/or disable PropertyPage Pin
Tom Archer10-May-02 7:59
Tom Archer10-May-02 7:59 
GeneralRe: How to hide and/or disable PropertyPage Pin
Eugene Pustovoyt10-May-02 8:45
Eugene Pustovoyt10-May-02 8:45 
GeneralRe: How to hide and/or disable PropertyPage Pin
Tom Archer10-May-02 11:20
Tom Archer10-May-02 11:20 
GeneralRe: How to hide and/or disable PropertyPage Pin
Eugene Pustovoyt15-May-02 6:51
Eugene Pustovoyt15-May-02 6:51 

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.