and function calculate have a parameter which is a reference of the struct Information. but in function main(), its parameter is a member of the Information. your parameter is wrong.
You'd better describe that what specific error you got i think.
For the code posted, there is no definition of Customer, so we cannot know the type of Customer->duration.
The parameter of double calculate(Information & Stay) is passed by reference, so please make sure that passing directly Customer->duration can be treated as a reference.
In your calculate function, Stay is a struct, not a number. If you want to multiply a struct by a number, you'll need to define your own multiplication operator, as the compiler can't possibly know what it means to multiply your struct by a number.
Edit: Did you mean to pass a number into calculate, rather than a struct? Or did you mean to multiply a specific member of your struct by FEE?
Edit 2: Also, you've defined calculate to take a struct as an argument, but on line 53, you're attempting to call it with an int as the argument.
Wow, thanks @MikeyBoy. I understand what my error was now. I needed to pass the actual member function instead of the all structure...like what you said. In hindsight, this problem was rather silly now that I think about it.
@MikeyBoy
Are you capable of making your own mathematical operators in C++? I think I have seen this in action with classes but I am not a 100% sure.
You're welcome! Yes, you can define your own mathematical operators for your types. You can create them as members of your class, or as free functions that operate on your class.
@vuonganh1993 and @aidyszh thanks for the responses and help. I think I could have made it easier on you guys if I gave you guys the full source code. My mistake.