Click here to Skip to main content
15,919,931 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Answerlets continue the same discussion Pin
chandu0048-Oct-07 1:03
chandu0048-Oct-07 1:03 
GeneralRe: lets continue the same discussion Pin
Hamid_RT8-Oct-07 1:10
Hamid_RT8-Oct-07 1:10 
GeneralRe: lets continue the same discussion Pin
chandu0048-Oct-07 1:14
chandu0048-Oct-07 1:14 
GeneralRe: lets continue the same discussion Pin
Hamid_RT8-Oct-07 1:22
Hamid_RT8-Oct-07 1:22 
GeneralRe: lets continue the same discussion Pin
JudyL_MD8-Oct-07 2:27
JudyL_MD8-Oct-07 2:27 
GeneralRe: lets continue the same discussion Pin
toxcct8-Oct-07 3:11
toxcct8-Oct-07 3:11 
GeneralRe: lets continue the same discussion Pin
Nemanja Trifunovic8-Oct-07 2:57
Nemanja Trifunovic8-Oct-07 2:57 
AnswerRe: union and struct Pin
ShilpiP8-Oct-07 1:52
ShilpiP8-Oct-07 1:52 
A structure is a collection of items of different types; and each data item will have its own memory location. Where as only one item within the union can be used at any time, because the memory allocated for each item inside the union is in a shared memory location i.e., only one memory location will be shared by the data items of union.

Size of union will be the size of the biggest variable.
For eg
#include "stdafx.h"
struct s
{
int i;
char ch;
float f;
};
union u
{
int i;
char ch;
float f;
};
int main(int argc, char* argv[])
{
printf("Hello World!\n");
s s1;
u u1;
printf("%d %d",sizeof(s1),sizeof(u1));
return 0;
}

than result is 12 and 4 .I think now it is clear for u.



Yes U Can ...If U Can ,Dream it , U can do it ...ICAN

Questionpointers Pin
KASR17-Oct-07 23:46
KASR17-Oct-07 23:46 
AnswerRe: pointers Pin
Maxwell Chen8-Oct-07 0:12
Maxwell Chen8-Oct-07 0:12 
AnswerRe: pointers Pin
Hamid_RT8-Oct-07 0:31
Hamid_RT8-Oct-07 0:31 
Questionabout thread memory space Pin
DSPCottage7-Oct-07 22:22
DSPCottage7-Oct-07 22:22 
AnswerRe: about thread memory space Pin
Matthew Faithfull7-Oct-07 23:03
Matthew Faithfull7-Oct-07 23:03 
GeneralRe: about thread memory space Pin
DSPCottage8-Oct-07 1:35
DSPCottage8-Oct-07 1:35 
AnswerRe: about thread memory space Pin
chandu0048-Oct-07 2:00
chandu0048-Oct-07 2:00 
QuestionHow to get Quit Event from WORD? Pin
PhanMinhDuy7-Oct-07 21:37
PhanMinhDuy7-Oct-07 21:37 
Questiontransfer to login page Pin
Rafiuddinmd7-Oct-07 21:21
Rafiuddinmd7-Oct-07 21:21 
QuestionRe: transfer to login page Pin
Nelek7-Oct-07 21:36
protectorNelek7-Oct-07 21:36 
QuestionRe: transfer to login page Pin
David Crow8-Oct-07 3:51
David Crow8-Oct-07 3:51 
AnswerRe: transfer to login page Pin
Iain Clarke, Warrior Programmer8-Oct-07 6:46
Iain Clarke, Warrior Programmer8-Oct-07 6:46 
Questionmutual connection class Pin
JesusLeFou1327-Oct-07 21:03
JesusLeFou1327-Oct-07 21:03 
AnswerRe: mutual connection class Pin
Roger Broomfield7-Oct-07 21:09
Roger Broomfield7-Oct-07 21:09 
AnswerRe: mutual connection class Pin
Cedric Moonen7-Oct-07 21:16
Cedric Moonen7-Oct-07 21:16 
GeneralRe: mutual connection class Pin
JesusLeFou1327-Oct-07 21:58
JesusLeFou1327-Oct-07 21:58 
QuestionHow to add a page in the mouse of the control panel ? Pin
nike_zzyun7-Oct-07 20:38
nike_zzyun7-Oct-07 20:38 

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.