Click here to Skip to main content
15,898,373 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow could I change the CMFCPropertyGridCtrl Property or value column width Pin
A&Ms5-Mar-10 6:49
A&Ms5-Mar-10 6:49 
AnswerRe: How could I change the CMFCPropertyGridCtrl Property or value column width Pin
jung-kreidler11-Sep-11 20:36
jung-kreidler11-Sep-11 20:36 
GeneralRe: How could I change the CMFCPropertyGridCtrl Property or value column width Pin
Martial Spirit15-Jul-21 22:55
Martial Spirit15-Jul-21 22:55 
Questionatof doesn't convert exactly [Solved] Pin
b-rad3115-Mar-10 6:17
b-rad3115-Mar-10 6:17 
AnswerRe: atof doesn't convert exactly Pin
Luc Pattyn5-Mar-10 6:31
sitebuilderLuc Pattyn5-Mar-10 6:31 
QuestionHow to add Messsage After installling Application using MSI Pin
am 20095-Mar-10 3:53
am 20095-Mar-10 3:53 
AnswerRe: How to add Messsage After installling Application using MSI Pin
Richard Andrew x645-Mar-10 15:31
professionalRichard Andrew x645-Mar-10 15:31 
QuestionStructure/Class member addresses Pin
Mike the Red5-Mar-10 2:58
Mike the Red5-Mar-10 2:58 
struct myStruct {
	int x;
	int y;
	char ch[10];
};
struct myOtherStruct {
	int y;
	char ch[10];
	int x;
};
class myClass {
public:
	myClass() { };
	~myClass() { };

	void someMethod(int x) { /*do something with x*/; };
private:
	int a;
	int b;
	char ch[10];
};

int main() {

	myStruct	s1;
	myOtherStruct	s2;
	myClass		c;
	return 0;

};


Given these struct/class definitions, is it always safe to assume:
<br />
&s1.x < &s1.y < &s1.ch<br />
&s2.y < &s2.ch < &s2.x<br />
&c.a < &c.b < &c.ch<br />


(Considering the addresses as numbers, like you'd get from (__int64)&s1.x)

Maybe an easier way to ask this is, "Is the order of the members in memory the same as the order in which they are declared?"

Thanks in advance for any help you guys can offer!
AnswerRe: Structure/Class member addresses Pin
CPallini5-Mar-10 3:22
mveCPallini5-Mar-10 3:22 
GeneralThanks, Pallini! -nt- Pin
Mike the Red5-Mar-10 3:43
Mike the Red5-Mar-10 3:43 
AnswerRe: Structure/Class member addresses Pin
Luc Pattyn5-Mar-10 4:12
sitebuilderLuc Pattyn5-Mar-10 4:12 
AnswerRe: Structure/Class member addresses Pin
Saurabh.Garg5-Mar-10 4:19
Saurabh.Garg5-Mar-10 4:19 
GeneralRe: Structure/Class member addresses Pin
Luc Pattyn5-Mar-10 4:25
sitebuilderLuc Pattyn5-Mar-10 4:25 
GeneralRe: Structure/Class member addresses Pin
Saurabh.Garg5-Mar-10 4:37
Saurabh.Garg5-Mar-10 4:37 
GeneralRe: Structure/Class member addresses Pin
Luc Pattyn5-Mar-10 4:50
sitebuilderLuc Pattyn5-Mar-10 4:50 
GeneralRe: Structure/Class member addresses Pin
CPallini5-Mar-10 5:26
mveCPallini5-Mar-10 5:26 
GeneralRe: Structure/Class member addresses Pin
Luc Pattyn5-Mar-10 5:32
sitebuilderLuc Pattyn5-Mar-10 5:32 
GeneralRe: Structure/Class member addresses Pin
CPallini5-Mar-10 5:59
mveCPallini5-Mar-10 5:59 
GeneralRe: Structure/Class member addresses Pin
Luc Pattyn5-Mar-10 6:05
sitebuilderLuc Pattyn5-Mar-10 6:05 
GeneralRe: Structure/Class member addresses Pin
CPallini5-Mar-10 6:24
mveCPallini5-Mar-10 6:24 
AnswerRe: Structure/Class member addresses Pin
Avi Berger5-Mar-10 5:11
Avi Berger5-Mar-10 5:11 
QuestionData Type Conversions Pin
Andy2025-Mar-10 2:06
Andy2025-Mar-10 2:06 
QuestionRe: Data Type Conversions Pin
CPallini5-Mar-10 3:28
mveCPallini5-Mar-10 3:28 
AnswerI'm not following the math you're doing, but maybe this will help.. Pin
Mike the Red5-Mar-10 3:33
Mike the Red5-Mar-10 3:33 
GeneralRe: I'm not following the math you're doing, but maybe this will help.. Pin
Andy2025-Mar-10 8:12
Andy2025-Mar-10 8:12 

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.