Can anyone explain structures for me? I cant quite understand the tutorial to satisfy my needs....
Can anyone explain structures for me? I cant quite understand the tutorial to satisfy my needs....
A structure is exactly like a class, except that its members are public by default.
A structure is a collection of variables placed in one object. Eg,Code:struct MyStruct // declaration of the structure { // declare the different variables that are a part of this collection... int var; float thing; char stuff[100]; }; int main() { MyStruct instance; // create an instance of the structure just like you would a normal variable // access the different variables within your newly declared object instance.var = 69; // heh, 69... return 0; }
Hi
Search this link.... you will be filled with information
cboard.cprogramming.com/showthread.php?threadid=32253
Have a wonderful day.... and keep smiling... you look terrific that way
signing off...
shiv... as i know him
If you want more info after that, then go here.
Lol... its the all mighty essay! But its the best I have read ever!
Totally recommended. By the way do you mind if I used that as a tutorial on my site?
-Devouring One-
Dev C++
Win XP/2k/98
I DO NOT TAKE CLASSES I DONT GET HOMEWORK THIS IS NOT A HOMEWORK QUESTION!!!
He's lean he's keen... He's the spank machine!
I'd prefer if you didn't (sorry). If I get a chance, I'd like to add to it and I might make a site and upload it. If you want, I can give you a link when and if that happens, and you can link to it.