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

C / C++ / MFC

 
AnswerRe: Difference b/w Unions and Structures... Pin
CPallini3-Jun-08 3:20
mveCPallini3-Jun-08 3:20 
AnswerRe: Difference b/w Unions and Structures... Pin
Alan Balkany3-Jun-08 3:20
Alan Balkany3-Jun-08 3:20 
GeneralRe: Difference b/w Unions and Structures... Pin
DQNOK3-Jun-08 9:28
professionalDQNOK3-Jun-08 9:28 
AnswerRe: Difference b/w Unions and Structures... Pin
toxcct3-Jun-08 3:22
toxcct3-Jun-08 3:22 
AnswerRe: Difference b/w Unions and Structures... Pin
Hamid_RT3-Jun-08 3:32
Hamid_RT3-Jun-08 3:32 
General[Message Deleted] Pin
toxcct3-Jun-08 3:33
toxcct3-Jun-08 3:33 
GeneralRe: Difference b/w Unions and Structures... Pin
Hamid_RT3-Jun-08 4:00
Hamid_RT3-Jun-08 4:00 
AnswerRe: Difference b/w Unions and Structures... Pin
sudhir_Kumar3-Jun-08 3:59
sudhir_Kumar3-Jun-08 3:59 
While structure enables us treat a number of different variables stored at different in memory , a union enables us to treat the same space in memory as a number of different variables. That is a Union offers a way for a section of memory to be treated as a variable of one type on one occasion and as a different variable of a different type on another occasion.

Union allocates the memory equal to the maximum memory required by the member of the union but structure allocates the memory equal to the total memory required by the members.

Union allocates the memory equal to the maximum memory required by the member of the union but structure allocates the memory equal to the total memory required by the members.

Example:

union exforsys_t {
char c;
int i;
float f;
} exforsys;


Defines three elements:

exforsys.c
exforsys.i
exforsys.f

Each one with a different data type. Since all of them are referring to the same location in memory, the modification of one of the elements will affect the value of all of them. We cannot store different values in them independent from each other.

Sudhir Kumar

Questionwhere can i get some unix filesystem emulator? Pin
sunerbun3-Jun-08 2:25
sunerbun3-Jun-08 2:25 
QuestionRe: where can i get some unix filesystem emulator? Pin
CPallini3-Jun-08 2:49
mveCPallini3-Jun-08 2:49 
AnswerRe: where can i get some unix filesystem emulator? Pin
toxcct3-Jun-08 2:55
toxcct3-Jun-08 2:55 
GeneralRe: where can i get some unix filesystem emulator? Pin
Hamid_RT3-Jun-08 3:10
Hamid_RT3-Jun-08 3:10 
GeneralRe: where can i get some unix filesystem emulator? Pin
toxcct3-Jun-08 3:12
toxcct3-Jun-08 3:12 
AnswerRe: where can i get some unix filesystem emulator? Pin
Rajkumar R3-Jun-08 3:11
Rajkumar R3-Jun-08 3:11 
QuestionIf one application is running second doesn't show up Pin
VCProgrammer3-Jun-08 1:57
VCProgrammer3-Jun-08 1:57 
AnswerRe: If one application is running second doesn't show up Pin
toxcct3-Jun-08 2:00
toxcct3-Jun-08 2:00 
GeneralRe: If one application is running second doesn't show up Pin
VCProgrammer3-Jun-08 2:21
VCProgrammer3-Jun-08 2:21 
GeneralRe: If one application is running second doesn't show up Pin
toxcct3-Jun-08 2:22
toxcct3-Jun-08 2:22 
AnswerRe: If one application is running second doesn't show up Pin
Hamid_RT3-Jun-08 2:00
Hamid_RT3-Jun-08 2:00 
AnswerRe: If one application is running second doesn't show up Pin
Cedric Moonen3-Jun-08 2:01
Cedric Moonen3-Jun-08 2:01 
AnswerRe: If one application is running second doesn't show up Pin
sudhir_Kumar3-Jun-08 2:08
sudhir_Kumar3-Jun-08 2:08 
QuestionRe: If one application is running second doesn't show up Pin
prasad_som3-Jun-08 2:13
prasad_som3-Jun-08 2:13 
AnswerRe: If one application is running second doesn't show up Pin
toxcct3-Jun-08 2:16
toxcct3-Jun-08 2:16 
QuestionChange the Application name Pin
Chandrasekharan P3-Jun-08 0:45
Chandrasekharan P3-Jun-08 0:45 
AnswerRe: Change the Application name Pin
Rajesh R Subramanian3-Jun-08 1:05
professionalRajesh R Subramanian3-Jun-08 1:05 

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.