Hello all. I have a function that is trying to return an array (overcoat) and a variable 'money' The program is quite large and is and old computer game called "Dopewars" Someone wrote it for the old graphing calculators back when I was in High School. in the program Money is a global variable and so is overcoat because they change everyday. the '&' ampersand just does not seem to do the trick. am I overloading it incorrectly? here's the code. The jist is that you have thirty days to make as much cash as possible in the "Street Pharmacy" business. once again I apologize if this offends anyone but it was a silly game and I am just trying to see if my skills have come along well enough to write it on my own. View attachment 4 the errors are 68 C:\Documents and Settings\Bill\My Documents\dopewarsrevised.cpp expected primary-expression before "int"
Update. I cleaned the code up to eliminate the problem of two returns but I still have the most nagging of problems that I cannot seem to figure out. The array is a double here is the program... Please help Thanks View attachment 5
1. your 'drugbuy' function expect to receive an array. But the argument you send from the main is an array subscript notation, which is a content of the array. i can run it when i solve this prob.