[Dev-C++] Stress with structs and pointers.
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: David M. <ci...@ya...> - 2003-06-12 00:15:58
|
Ok, I need some clarification on a couple topics invloving pointers and pointers.
1) when a struct is created. All that can be assumed is that it contains trash right? What is a portable way to initalize everything to 0? mset?
2) when a structure contains a pointer. Access to the address (not the value) comes in the form {struct_variable_name}.{member_name}?
3) how do you de-refrence the pointer in #2 to get the value of the variable? {struct_variable_name}.*{member_name}?
4) if you have a pointer to the structure you access the members via '->'. If a member of the structure is a pointer the address is gotten via {struct_varible_name}->{member_name}? If so how does one get the value of the varible? {struct_variable_name}->*{member_name}?
Thanks in Advance
David McKen
P.S. Was begining to run out of hair!
---------------------------------
Do you Yahoo!?
Free online calendar with sync to Outlook(TM). |