Click here to Skip to main content
15,894,410 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: size of Objects Pin
haian244213-Feb-06 23:01
haian244213-Feb-06 23:01 
GeneralRe: size of Objects Pin
Subramaniam s.V.13-Feb-06 23:14
Subramaniam s.V.13-Feb-06 23:14 
GeneralRe: size of Objects Pin
BadKarma13-Feb-06 23:24
BadKarma13-Feb-06 23:24 
GeneralRe: size of Objects Pin
Subramaniam s.V.13-Feb-06 23:29
Subramaniam s.V.13-Feb-06 23:29 
GeneralRe: size of Objects Pin
BadKarma13-Feb-06 23:46
BadKarma13-Feb-06 23:46 
GeneralRe: size of Objects Pin
Subramaniam s.V.14-Feb-06 0:16
Subramaniam s.V.14-Feb-06 0:16 
GeneralRe: size of Objects Pin
sunit514-Feb-06 3:16
sunit514-Feb-06 3:16 
GeneralRe: size of Objects Pin
BadKarma14-Feb-06 3:58
BadKarma14-Feb-06 3:58 
sunit5 wrote:
I have to set the size such that it should get same or greater than the largest(never less) member size

What do you mean, it all depends on how the structure need to be alligned.
If you don't use this compile option (set it to default), the allignment will be calculated
on the greatest type in the structure. Is this what you need ?.

For instance I needed to send binary data (all data is layed out in structures) to
another program this -embeded- program was written/compiled on 2 byte alignment
(meaning an int would allign on a 2 byte boundary) while my default allignment causes
an int to be alligned on a 4 byte boundary. I could set the compile option to allign on
2 byte, but -there is always a butBig Grin | :-D - another embeded program used the 4 byte
allignment for its binary data. So I needed to implement both. I left my default alligment
on 4 bytes, and used #pragma pack to set the alligment to 2 bytes for a few structures.



codito ergo sum
GeneralRe: size of Objects Pin
sunit514-Feb-06 18:06
sunit514-Feb-06 18:06 
GeneralRe: size of Objects Pin
Cedric Moonen14-Feb-06 1:13
Cedric Moonen14-Feb-06 1:13 
GeneralRe: size of Objects Pin
Cedric Moonen14-Feb-06 1:15
Cedric Moonen14-Feb-06 1:15 
Questiona question regarding CStringList Pin
namaskaaram13-Feb-06 19:52
namaskaaram13-Feb-06 19:52 
AnswerRe: a question regarding CStringList Pin
Subramaniam s.V.13-Feb-06 20:40
Subramaniam s.V.13-Feb-06 20:40 
Generalits the same thing! Pin
namaskaaram13-Feb-06 21:00
namaskaaram13-Feb-06 21:00 
GeneralRe: its the same thing! Pin
Subramaniam s.V.13-Feb-06 21:10
Subramaniam s.V.13-Feb-06 21:10 
GeneralRe: its the same thing! Pin
namaskaaram13-Feb-06 21:18
namaskaaram13-Feb-06 21:18 
GeneralRe: its the same thing! Pin
Subramaniam s.V.13-Feb-06 21:23
Subramaniam s.V.13-Feb-06 21:23 
GeneralRe: its the same thing! Pin
namaskaaram13-Feb-06 22:06
namaskaaram13-Feb-06 22:06 
AnswerRe: a question regarding CStringList Pin
toxcct13-Feb-06 21:31
toxcct13-Feb-06 21:31 
GeneralRe: a question regarding CStringList Pin
Cedric Moonen13-Feb-06 21:35
Cedric Moonen13-Feb-06 21:35 
GeneralRe: a question regarding CStringList Pin
namaskaaram13-Feb-06 22:01
namaskaaram13-Feb-06 22:01 
GeneralRe: a question regarding CStringList Pin
toxcct13-Feb-06 22:07
toxcct13-Feb-06 22:07 
AnswerRe: a question regarding CStringList Pin
Cedric Moonen13-Feb-06 21:33
Cedric Moonen13-Feb-06 21:33 
GeneralRe: a question regarding CStringList Pin
toxcct13-Feb-06 21:41
toxcct13-Feb-06 21:41 
GeneralRe: a question regarding CStringList Pin
Cedric Moonen13-Feb-06 21:44
Cedric Moonen13-Feb-06 21:44 

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.