Click here to Skip to main content
15,920,687 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralCustom collections Pin
sultan_of_6string18-Jun-02 16:15
sultan_of_6string18-Jun-02 16:15 
GeneralRe: Custom collections Pin
James T. Johnson20-Jun-02 14:02
James T. Johnson20-Jun-02 14:02 
GeneralTwo classes Pin
Michael Mac18-Jun-02 11:04
Michael Mac18-Jun-02 11:04 
GeneralRe: Two classes Pin
J Patel18-Jun-02 11:28
J Patel18-Jun-02 11:28 
GeneralRe: Two classes Pin
Michael Mac19-Jun-02 1:52
Michael Mac19-Jun-02 1:52 
GeneralRe: Two classes Pin
Maciej Pirog19-Jun-02 1:27
Maciej Pirog19-Jun-02 1:27 
GeneralRe: Two classes Pin
Michael Mac19-Jun-02 1:49
Michael Mac19-Jun-02 1:49 
GeneralRe: Two classes Pin
Maciej Pirog19-Jun-02 4:10
Maciej Pirog19-Jun-02 4:10 
Yoe'r right Blush | :O

But I've got an idea!

Put:
1st classes declarations
2nd classes definitions and functions declarations
3rd functions definitions

Example:
// Classes declarations:
public __gc class __single_inheritance b;
public __gc class __single_inheritance a;
// Classes definitions and functions *declarations*:
public __gc class a
{
public:
	void AskClassBToWrite();
	void WriteA();
	b* m_b;
};

public __gc class b
{
public:
	void AskClassAToWrite();
	void WriteB();
	a* m_a;
};
// functions *definitions*
void a::WriteA()
{
	Console::Write("WriteA function was called");
}

void a::AskClassBToWrite()
{
	a::m_b->WriteB();
}

void b::WriteB()
{
	Console::Write("WriteB function was called");
}

void b::AskClassAToWrite()
{
	b::m_a->WriteA();
}

// This is the entry point for this application
int _tmain(void)
{
	a* A = new a();
	b* B = new b();

	A->m_b = B;
	B->m_a = A;

	A->AskClassBToWrite();
	B->AskClassAToWrite();

	Console::Read();
    return 0;
}


This will work! Smile | :)

MP
Maciej Pirog
GeneralRe: Two classes Pin
Michael Mac19-Jun-02 6:30
Michael Mac19-Jun-02 6:30 
GeneralMC++ Competition - any last minute developers want to team up. Pin
TigerNinja_16-Jun-02 16:44
TigerNinja_16-Jun-02 16:44 
Generali need help!!!!! Pin
ChiYung15-Jun-02 16:20
ChiYung15-Jun-02 16:20 
GeneralRe: i need help!!!!! Pin
David Wengier15-Jun-02 16:51
David Wengier15-Jun-02 16:51 
GeneralRe: i need help!!!!! Pin
Rama Krishna Vavilala15-Jun-02 18:13
Rama Krishna Vavilala15-Jun-02 18:13 
GeneralRe: i need help!!!!! Pin
David Wengier15-Jun-02 18:21
David Wengier15-Jun-02 18:21 
GeneralHeap management in a multithreaded windows application Pin
sailesh14-Jun-02 20:29
sailesh14-Jun-02 20:29 
GeneralRe: Heap management in a multithreaded windows application Pin
James T. Johnson14-Jun-02 20:42
James T. Johnson14-Jun-02 20:42 
GeneralSome hope for MC++ coders Pin
Nish Nishant13-Jun-02 19:55
sitebuilderNish Nishant13-Jun-02 19:55 
GeneralRe: Some hope for MC++ coders Pin
Derek Lakin13-Jun-02 20:06
Derek Lakin13-Jun-02 20:06 
GeneralRe: Some hope for MC++ coders Pin
Nish Nishant13-Jun-02 20:25
sitebuilderNish Nishant13-Jun-02 20:25 
GeneralRe: Some hope for MC++ coders Pin
Alexandru Savescu13-Jun-02 21:52
Alexandru Savescu13-Jun-02 21:52 
GeneralRe: Some hope for MC++ coders Pin
Nish Nishant13-Jun-02 21:59
sitebuilderNish Nishant13-Jun-02 21:59 
GeneralRe: Some hope for MC++ coders Pin
Michael P Butler13-Jun-02 22:08
Michael P Butler13-Jun-02 22:08 
GeneralRe: Some hope for MC++ coders Pin
Nish Nishant13-Jun-02 22:21
sitebuilderNish Nishant13-Jun-02 22:21 
GeneralRe: Some hope for MC++ coders Pin
James T. Johnson13-Jun-02 22:23
James T. Johnson13-Jun-02 22:23 
GeneralRe: Some hope for MC++ coders Pin
Nish Nishant13-Jun-02 22:26
sitebuilderNish Nishant13-Jun-02 22:26 

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.