Last part of code.

When I build, I get this error message: There is no context in which this conversion is possible. Its the last structure I am having problems with. The miles and 5 are underlined. Please tell me what I need to change. Thanks in advance.

string names[noPeople];
double miles[noPeople][noDays];
double results[noPeople][2];

read(names, 5, miles, 5);
calculate(results, miles, 5);
print(results, names, 5);
return 0;
Last edited on
Simple- your print function requires three arguments- a matrix of two dimensions, an integer, and an array of strings. In your call to print, you pass to it a matrix of two dimensions, an array of strings, and an integer. In other words, in:

print(results, names, 5);

Switch names and 5 with each other. Actually... In the calculate function call, you have the same issue.

calculate(results, miles, 5);

Switch miles and 5 with each other.
Thank you very much. I've been trying my best with these programs and I still have simple mistakes. Thanks for the help.
Topic archived. No new replies allowed.