Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Trouble passing arguments to a function
I have been writting a program where, i have defined the following structure in a header file :
I have another header file in which i have defined some functions, the main one being :
phase1(struct the_box obj);
In my main program, i have created an object for struct the_box and i have passed it to phase1.
This is giving me lots of errors, can someone please tell me whats going wrong here? How can i pass a user-defined structure to a function when they are in different header files? I have included all the user-derfined header files in both the main program and in the header file containing the functions.
Thanks in advance for any help
0 · ·