Hi...
how I can create a structure that pointing to another different structure. And also passing structure to function.
thank you.
Hi...
how I can create a structure that pointing to another different structure. And also passing structure to function.
thank you.
KurtCode:struct x { int a; }; struct y { struct x * z; } s; void foo(struct y bar) { } int main() { foo(s ); }
Hi...Zuk
could you give an explanation for the above ...
KurtCode:struct x { int a; }; struct y { // defines a struct that contains a member that points to another struct struct x * z; } s; // s is an instance of a struct y void foo(struct y bar) { // a function that takes a struct y as parmeter } int main() { foo( s ); // call a function that takes a struct as parameter }