I am having an error at line 21. Specifically the code where it says "list[num]=x"
How am I able to fix this code to do what I want? The purpose of my program is to enter in positive numbers in an array (and having it end when 0 is typed) My program also accepts negative values but will ignore them when it is outputted. I believe I have all the code right except for line 21. Any help would be great.
Your first parameter is declared as an array of constant integers, meaning they cannot be changed. This is almost certainly not wha you wanted, just remove the 'const'. The second parameter is fine though.