struct data type error

fixed
Last edited on
The problem is with
string x = restriction(city);

Your restriction function takes the data type: int as the arg and you are trying to pass data type: RainCity to it. I'm not sure what the restriction function is supposed to do or else i'd try to help you out more, but that is what is happening.
Your program should call a function that will determine whether there are restrictions on water use and save it in the restriction element of city. The function will return the character ā€˜yā€™ if there was less than 4 inches of rain, and ā€˜nā€™ otherwise.

if this clear things up.

Yeah i get what your trying to say. I was thinking that too but idk how to change it to make it work.
Last edited on
Instead of doing string x = restriction(city); try string x = restriction(city.rainfall);
Omg it runs but still theres a problem with the code. I will try my best to fix the rest. Thanks so much. Life saver!


Update: FIXED all good. Kudos to you pindrought thanks for helping
Last edited on
Topic archived. No new replies allowed.