I want to write a code that gets three values from the user and puts them into three arrays. When the user enters -999, I want to print out a chart showing all the values they put in. This is what I have so far but it wont build. It tells me std::string is requested, but I'm not sure where to put it, and printArrays is declared void. How can I fix this?
Line 25: Because of this line, you're going to have out of bounds issues when your program actually does run, because of lines 29 and 32 where you're going to try and access element #400, when element numbers run from 0 to 399, inclusive.
Lines 40 and 42: Er. Did you mean to have these switched? Also, why return ARSIZE and not zero, out of curiosity?
Line 42: You should not have the [ARSIZE]s there because they're essentially getting the nonexistent 400th element and trying to pass it into a function parameter that expects an array. Also, your function expects a string as the first parameter and an integer as the last.
Line 43: You're missing a bracket here.
Line 45: The syntax of your function definition isn't quite right. That line needs to mirror the declaration you made on line 8.
Line 25: I think I may have confused myself here. The goal is to get the level number into the levelsArray but when I just cin<<levelsArray on lines 29 and 32, a whole bunch of errors come up.
Lines 40 and 42: Can they be switched and still work? The hint on the assignment is "Return the number of levels that were placed in the arrays (think about the subscript)" so I just assumed I should return ARSIZE.
Line 43: The brackets on void functions confuse me. Should it look like this?
I've fixed line 45 and 53 and deleted the ARSIZE's from line 42. How do I give the function a string as the first parameter and an integer as the last? I'm not sure what you mean by that.