I'm sorry guys, I swear this will be my last post of the day
How would I return a structure from function a to function b so that I can acces the data members of the structure in function b?
Cheers
I'm sorry guys, I swear this will be my last post of the day
How would I return a structure from function a to function b so that I can acces the data members of the structure in function b?
Cheers
"Yes, I rather like this God fellow. He's very theatrical, you know, a pestilence here, a plague there. Omnipotence. Gotta get me some of that."
- Stewie Griffin
Return a pointer to that structure. Your function prototype would like
Don't forget that when working with pointers to structures you need to use the -> operator instead of the . operator - it makes dereferncing MUCH easier.Code:struct_type * function_name(...)
Cheers boss! At last it's all working, I'm so happy I think I'll cry myself to sleep!
"Yes, I rather like this God fellow. He's very theatrical, you know, a pestilence here, a plague there. Omnipotence. Gotta get me some of that."
- Stewie Griffin