Hey guys there is a problem in my program...I have divided my program into three files firstly named main.cpp and it gets the input from the user and second file is header file named ass.h and name of functions mentioned there and finally i have written all functions and global data are in ass2.cpp...
the problem is i have defined a struct in ass2.cpp and also i want to pass it to a function but in ass2.h where i must declare only name of functions my structure is unknown and i can't define the structure in that part...
I tend to declare the interface to my classes in the header files and implement them in the corresponding .cpp file. If you don't want to do more than declare the class in your header file (ass2.h) then it sounds that what you need is to forward declare your class/struct. This is simply done by writing
struct YourStruct;
before your instantiate the struct in your function argument in ass2.h.