Click here to Skip to main content
16,014,392 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Split Edit box that's size can be changed Pin
dlhson4-Apr-02 4:48
dlhson4-Apr-02 4:48 
QuestionCombobox read only??? Pin
TommyKnocker4-Apr-02 3:26
TommyKnocker4-Apr-02 3:26 
AnswerRe: Combobox read only??? Pin
Michael P Butler4-Apr-02 3:50
Michael P Butler4-Apr-02 3:50 
AnswerRe: Combobox read only??? Pin
Jon Hulatt4-Apr-02 4:15
Jon Hulatt4-Apr-02 4:15 
AnswerRe: Combobox read only??? Pin
dlhson4-Apr-02 4:33
dlhson4-Apr-02 4:33 
GeneralLogonUser(..) Pin
hph4-Apr-02 3:24
hph4-Apr-02 3:24 
GeneralCode Segment Question Pin
Loli104-Apr-02 2:58
Loli104-Apr-02 2:58 
GeneralRe: Code Segment Question Pin
Niklas L4-Apr-02 3:28
Niklas L4-Apr-02 3:28 
This question does not have a single answere since it depends on the target machine, your compiler, compiler settings...
If you run on Win32 and use VC compiler with standard settings I'd say your struct will take up 52 bytes of memory. There are 4 'hidden' bytes in there. two comes after Office, and 2 after phone. This is due to byte alignment. For efficiency, datatypes like float and int are put an a 4 byte boundary. This allows the CPU to fetch your data in a single call.
If you want to check the size of your datatypes you should use the operator sizeof(), e.g. int instsize = sizeof(struct Inst). This will also show that your pointer is 4 bytes (again depending on the target machine)
If you are familiar with pragmas you could try putting #pragma pack(1) before you declare your struct and se what happens.

Hope that helps.
GeneralRe: Code Segment Question Pin
Alvaro Mendez4-Apr-02 8:31
Alvaro Mendez4-Apr-02 8:31 
GeneralRe: Code Segment Question Pin
Derek Waters4-Apr-02 12:49
Derek Waters4-Apr-02 12:49 
GeneralGetFreeSpaceForDrive Pin
Shotgun4-Apr-02 2:53
Shotgun4-Apr-02 2:53 
GeneralRe: GetFreeSpaceForDrive Pin
Niklas L4-Apr-02 3:04
Niklas L4-Apr-02 3:04 
GeneralRe: GetFreeSpaceForDrive Pin
Niklas L4-Apr-02 3:09
Niklas L4-Apr-02 3:09 
QuestionAn access problem ?? Pin
4-Apr-02 2:43
suss4-Apr-02 2:43 
AnswerRe: An access problem ?? Pin
Michael P Butler4-Apr-02 3:04
Michael P Butler4-Apr-02 3:04 
GeneralRe: An access problem ?? Pin
4-Apr-02 4:27
suss4-Apr-02 4:27 
GeneralRe: An access problem ?? Pin
4-Apr-02 4:30
suss4-Apr-02 4:30 
GeneralWord Wrap in Edit Ctrl Pin
Hyien4-Apr-02 2:38
Hyien4-Apr-02 2:38 
GeneralRe: Word Wrap in Edit Ctrl Pin
Tomasz Sowinski4-Apr-02 6:04
Tomasz Sowinski4-Apr-02 6:04 
GeneralSocket Question Pin
Mauricio Ritter4-Apr-02 2:19
Mauricio Ritter4-Apr-02 2:19 
GeneralRe: Socket Answer Pin
Le centriste4-Apr-02 3:24
Le centriste4-Apr-02 3:24 
GeneralRe: Socket Answer Pin
Anders Molin4-Apr-02 4:04
professionalAnders Molin4-Apr-02 4:04 
GeneralRe: Socket Answer Pin
Le centriste4-Apr-02 5:44
Le centriste4-Apr-02 5:44 
GeneralRe: Socket Question Pin
Anders Molin4-Apr-02 4:05
professionalAnders Molin4-Apr-02 4:05 
GeneralRetrieve command prompt output to UI Pin
Aoife4-Apr-02 1:23
Aoife4-Apr-02 1:23 

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.