Click here to Skip to main content
15,891,645 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: MFC and Serialize... How do I attach an icon/schema? Pin
maxmaven11-Apr-07 18:20
maxmaven11-Apr-07 18:20 
GeneralRe: MFC and Serialize... How do I attach an icon/schema? Pin
Steve S11-Apr-07 21:27
Steve S11-Apr-07 21:27 
GeneralRe: MFC and Serialize... How do I attach an icon/schema? Pin
maxmaven12-Apr-07 11:05
maxmaven12-Apr-07 11:05 
Questionopengl and tcp/ip Pin
synapticleft11-Apr-07 14:55
synapticleft11-Apr-07 14:55 
AnswerRe: opengl and tcp/ip Pin
El Corazon11-Apr-07 15:18
El Corazon11-Apr-07 15:18 
GeneralRe: opengl and tcp/ip Pin
synapticleft16-Apr-07 13:11
synapticleft16-Apr-07 13:11 
GeneralRe: opengl and tcp/ip Pin
Moak17-Apr-07 0:13
Moak17-Apr-07 0:13 
QuestionIs this a Bug or What? Pin
sanket.patel11-Apr-07 11:37
sanket.patel11-Apr-07 11:37 
Hello All !!
I am using visual studio 6.0
I tried to access the private class member outside the class using #define macro.
here is the code. I was able to access private member outside the class? why did this work? This should be allowed or not?

<code>

#define private public

class A
{

private:
	int i;

public:
	A()
	{
		i = 44;
	}

};

int main()
{
	A obA;
	cout<<"\ni = "<<obA.i;
	cout<<"\n";

	return 0;
}
</code>


sanket

AnswerRe: Is this a Bug or What? Pin
sthotakura11-Apr-07 11:47
sthotakura11-Apr-07 11:47 
GeneralRe: Is this a Bug or What? Pin
sanket.patel11-Apr-07 11:53
sanket.patel11-Apr-07 11:53 
GeneralRe: Is this a Bug or What? Pin
sthotakura11-Apr-07 11:58
sthotakura11-Apr-07 11:58 
GeneralRe: Is this a Bug or What? Pin
toxcct11-Apr-07 12:03
toxcct11-Apr-07 12:03 
GeneralRe: Is this a Bug or What? Pin
Christian Graus11-Apr-07 15:49
protectorChristian Graus11-Apr-07 15:49 
GeneralRe: Is this a Bug or What? Pin
BadKarma11-Apr-07 20:34
BadKarma11-Apr-07 20:34 
GeneralRe: Is this a Bug or What? Pin
Christian Graus12-Apr-07 1:50
protectorChristian Graus12-Apr-07 1:50 
GeneralRe: Is this a Bug or What? Pin
Rajesh R Subramanian11-Apr-07 22:43
professionalRajesh R Subramanian11-Apr-07 22:43 
AnswerRe: Is this a Bug or What? Pin
toxcct11-Apr-07 12:00
toxcct11-Apr-07 12:00 
GeneralRe: Is this a Bug or What? Pin
sanket.patel11-Apr-07 12:11
sanket.patel11-Apr-07 12:11 
GeneralRe: Is this a Bug or What? Pin
toxcct11-Apr-07 12:17
toxcct11-Apr-07 12:17 
GeneralRe: Is this a Bug or What? Pin
sanket.patel11-Apr-07 12:25
sanket.patel11-Apr-07 12:25 
AnswerRe: Is this a Bug or What? Pin
Michael Dunn11-Apr-07 18:47
sitebuilderMichael Dunn11-Apr-07 18:47 
AnswerRe: Is this a Bug or What? Pin
Rajesh R Subramanian11-Apr-07 18:53
professionalRajesh R Subramanian11-Apr-07 18:53 
AnswerRe: Is this a Bug or What? Pin
cp987611-Apr-07 20:11
cp987611-Apr-07 20:11 
GeneralRe: Is this a Bug or What? Pin
Mark Salsbery12-Apr-07 8:15
Mark Salsbery12-Apr-07 8:15 
QuestionUpgraded from Visual C++ 6.0 Pin
SimplCodr11-Apr-07 10:56
SimplCodr11-Apr-07 10:56 

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.