Click here to Skip to main content
14,485,669 members

C / C++ / MFC

 
Questionhow to layout stack values in VC++6.0 by myself but not compiler? thank u Pin
kaviniswell26-Jan-10 2:33
Memberkaviniswell26-Jan-10 2:33 
QuestionRe: how to layout stack values in VC++6.0 by myself but not compiler? thank u Pin
CPallini26-Jan-10 3:32
mveCPallini26-Jan-10 3:32 
AnswerRe: how to layout stack values in VC++6.0 by myself but not compiler? thank u Pin
kaviniswell26-Jan-10 4:19
Memberkaviniswell26-Jan-10 4:19 
AnswerRe: how to layout stack values in VC++6.0 by myself but not compiler? thank u Pin
Maximilien26-Jan-10 4:36
MemberMaximilien26-Jan-10 4:36 
GeneralRe: how to layout stack values in VC++6.0 by myself but not compiler? thank u Pin
kaviniswell27-Jan-10 2:06
Memberkaviniswell27-Jan-10 2:06 
AnswerRe: how to layout stack values in VC++6.0 by myself but not compiler? thank u Pin
BonshatS26-Jan-10 4:52
MemberBonshatS26-Jan-10 4:52 
GeneralRe: how to layout stack values in VC++6.0 by myself but not compiler? thank u Pin
kaviniswell27-Jan-10 2:33
Memberkaviniswell27-Jan-10 2:33 
AnswerRe: how to layout stack values in VC++6.0 by myself but not compiler? thank u Pin
Emilio Garavaglia26-Jan-10 5:28
MemberEmilio Garavaglia26-Jan-10 5:28 
Unless you are forced to decide yourself the memory layout (for example to be compatible with some other pre-existing code) don't worry about that.

Your arch1 and arch2 are distinct arrays and the compiler place them at the beginning of a 32bit block so that the processor access speed can be optimum.

You can alter this behavior with the #pragma pack directive, setting the packing to 1 byte you'll get what you expected. But -if you're not explicitly required to do that- let the compiler to do its job and decide by itself how to place variables.


2 bugs found.
> recompile ...
65534 bugs found.
D'Oh! | :doh:


GeneralRe: how to layout stack values in VC++6.0 by myself but not compiler? thank u Pin
kaviniswell27-Jan-10 2:14
Memberkaviniswell27-Jan-10 2:14 
QuestionDirectShow IMediaSeeking Pin
rajas25-Jan-10 22:20
Memberrajas25-Jan-10 22:20 
AnswerRe: DirectShow IMediaSeeking Pin
CPallini25-Jan-10 23:01
mveCPallini25-Jan-10 23:01 
QuestionCreating MFC based window inside Win32 Pin
sthalasayanam25-Jan-10 18:11
Membersthalasayanam25-Jan-10 18:11 
AnswerRe: Creating MFC based window inside Win32 Pin
CPallini25-Jan-10 21:25
mveCPallini25-Jan-10 21:25 
GeneralRe: Creating MFC based window inside Win32 Pin
Dragondima26-Jan-10 3:44
MemberDragondima26-Jan-10 3:44 
GeneralRe: Creating MFC based window inside Win32 Pin
CPallini26-Jan-10 3:51
mveCPallini26-Jan-10 3:51 
QuestionPNG format graphics on the display Pin
sthalasayanam25-Jan-10 18:04
Membersthalasayanam25-Jan-10 18:04 
AnswerRe: PNG format graphics on the display Pin
Chris Losinger25-Jan-10 18:10
professionalChris Losinger25-Jan-10 18:10 
AnswerRe: PNG format graphics on the display Pin
CPallini25-Jan-10 21:30
mveCPallini25-Jan-10 21:30 
AnswerRe: PNG format graphics on the display Pin
jophoenix26-Jan-10 4:12
Memberjophoenix26-Jan-10 4:12 
QuestionCalling functions in DLL (Flash) that I didn't load Pin
opensoar25-Jan-10 8:32
Memberopensoar25-Jan-10 8:32 
AnswerRe: Calling functions in DLL (Flash) that I didn't load Pin
CODEPC25-Jan-10 11:31
MemberCODEPC25-Jan-10 11:31 
GeneralRe: Calling functions in DLL (Flash) that I didn't load Pin
opensoar25-Jan-10 12:02
Memberopensoar25-Jan-10 12:02 
AnswerRe: Calling functions in DLL (Flash) that I didn't load Pin
Richard MacCutchan25-Jan-10 12:07
mveRichard MacCutchan25-Jan-10 12:07 
GeneralRe: Calling functions in DLL (Flash) that I didn't load Pin
opensoar25-Jan-10 12:29
Memberopensoar25-Jan-10 12:29 
GeneralRe: Calling functions in DLL (Flash) that I didn't load Pin
Richard MacCutchan25-Jan-10 12:41
mveRichard MacCutchan25-Jan-10 12:41 

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.