Click here to Skip to main content
15,851,701 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: 900520 - VC6 vs VS 2010 Pin
Maximilien12-Aug-11 1:52
Maximilien12-Aug-11 1:52 
GeneralRe: 900520 - VC6 vs VS 2010 Pin
ilostmyid212-Aug-11 8:21
professionalilostmyid212-Aug-11 8:21 
GeneralRe: 900520 - VC6 vs VS 2010 Pin
Maximilien12-Aug-11 8:47
Maximilien12-Aug-11 8:47 
GeneralRe: 900520 - VC6 vs VS 2010 Pin
ilostmyid212-Aug-11 8:59
professionalilostmyid212-Aug-11 8:59 
GeneralRe: 900520 - VC6 vs VS 2010 Pin
MicroVirus12-Aug-11 9:31
MicroVirus12-Aug-11 9:31 
GeneralRe: 900520 - VC6 vs VS 2010 Pin
ilostmyid212-Aug-11 14:39
professionalilostmyid212-Aug-11 14:39 
GeneralRe: 900520 - VC6 vs VS 2010 Pin
MicroVirus12-Aug-11 5:36
MicroVirus12-Aug-11 5:36 
AnswerRe: 900520 - VC6 vs VS 2010 Pin
ilostmyid212-Aug-11 19:22
professionalilostmyid212-Aug-11 19:22 
let's continue with a completed code. i wonder that it really works and it's not going to be a mistake or bug of the compiler:
C++
#include "StdAfx.h"

using namespace std;

class A
{
public:
	struct Info
	{
		int A::*a;
	};
	int a, b;
	static Info m_values[];

	void f();
};

A::Info A::m_values[] = {&a, &b};

void A::f()
{
	int a = this->*(m_values[0].a);
	int b = this->*(m_values[1].a);
	cout << "m_values: " << a << ", " << b << endl;
}

void f()
{
	A a1, a2;
	a1.a = 10;
	a1.b = 11;
	a2.a = 20;
	a2.b = 21;
	a1.f();
	a2.f();
}

the output is:
m_values: 10, 11
m_values: 20, 21
so how does vc6 implements this and what's the equivalent code in vs2010?
thx
GeneralRe: 900520 - VC6 vs VS 2010 Pin
ilostmyid212-Aug-11 19:30
professionalilostmyid212-Aug-11 19:30 
QuestionDirecting logcxx to a log4net appender Pin
Berlus11-Aug-11 0:47
Berlus11-Aug-11 0:47 
AnswerRe: Directing logcxx to a log4net appender Pin
Richard MacCutchan11-Aug-11 6:50
mveRichard MacCutchan11-Aug-11 6:50 
AnswerRe: Directing logcxx to a log4net appender Pin
jschell11-Aug-11 14:03
jschell11-Aug-11 14:03 
QuestionHow to eliminate MOBILE SDK from my Document Explorer 2008? Pin
Cold_Fearing_Bird10-Aug-11 20:19
Cold_Fearing_Bird10-Aug-11 20:19 
AnswerRe: How to eliminate MOBILE SDK from my Document Explorer 2008? Pin
Richard MacCutchan10-Aug-11 23:59
mveRichard MacCutchan10-Aug-11 23:59 
GeneralRe: How to eliminate MOBILE SDK from my Document Explorer 2008? Pin
Cold_Fearing_Bird11-Aug-11 1:11
Cold_Fearing_Bird11-Aug-11 1:11 
GeneralRe: How to eliminate MOBILE SDK from my Document Explorer 2008? Pin
Richard MacCutchan11-Aug-11 1:26
mveRichard MacCutchan11-Aug-11 1:26 
QuestionVC6 in Win 7 problem Pin
_Flaviu10-Aug-11 20:06
_Flaviu10-Aug-11 20:06 
AnswerRe: VC6 in Win 7 problem Pin
ThatsAlok10-Aug-11 21:39
ThatsAlok10-Aug-11 21:39 
AnswerRe: VC6 in Win 7 problem Pin
MicroVirus11-Aug-11 7:59
MicroVirus11-Aug-11 7:59 
GeneralRe: VC6 in Win 7 problem Pin
_Flaviu11-Aug-11 22:38
_Flaviu11-Aug-11 22:38 
GeneralRe: VC6 in Win 7 problem Pin
MicroVirus12-Aug-11 5:25
MicroVirus12-Aug-11 5:25 
GeneralRe: VC6 in Win 7 problem Pin
_Flaviu11-Aug-11 22:37
_Flaviu11-Aug-11 22:37 
QuestionHow to do the MFC to get the return of another console program? Pin
adalcol10-Aug-11 5:55
adalcol10-Aug-11 5:55 
QuestionRe: How to do the MFC to get the return of another console program? Pin
David Crow10-Aug-11 6:26
David Crow10-Aug-11 6:26 
AnswerRe: How to do the MFC to get the return of another console program? Pin
adalcol10-Aug-11 7:34
adalcol10-Aug-11 7:34 

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.