Hey guys,
where can I find decent notes on the net on Structures..I am sure you guys must know libraries on the net that do a good job of explaining it..Please let me know.Thanks!
A
Hey guys,
where can I find decent notes on the net on Structures..I am sure you guys must know libraries on the net that do a good job of explaining it..Please let me know.Thanks!
A
A structure is a group of variables which are given a new variable type.Code:struct mystruct { /* stuff goes here */ };
struct mystruct x;
This is creating an instance of a variable, named 'x', who's type is 'struct mystruct'.
You access the members of the structure by using the . operator.
For example:
'struct mystruct' contains an integer called 'myint'.
To access it, we use:
x.myint
So, to set the variable:
x.myint = 10;
This is the same thing as:
int someint;
someint = 10;
Structures are very easy to understand and use.
Quzah.
Hope is the first step on the road to disappointment.
That was a real good explanation Quzah!!!
Thanks Quzah but I was hoping to find tutorials on the net..and thought that you guys might know of some..
Google is your friend.Originally posted by aspand
Thanks Quzah but I was hoping to find tutorials on the net..and thought that you guys might know of some..
Quzah.
Hope is the first step on the road to disappointment.
that really helps!!!!
> that really helps
Agreed.
The world is waiting. I must leave you now.
I was being sarcastic!!!