index outside the bounds of array error
so i have this program that is supposed to make the user add the amount of students in a class then fill out the names. for some reason after the user inputs how many students are in the class and starts filling out the names it breaks. it pulls up with the error of the index outside the bounds of array error
7 Replies
the screenshot you shared doesn't even compile
what do you mean
if your code isn't valid C# then it won't even compile
meaning you can't even run it
read before you click the debug button
do you see the squiggly red line under
[total_students]
?
also is your "Error List" visible in Visual Studio?
you should see an erroryou are probably executing an older version of the code, when you have an error VS will ask if you want to run the last compiled version. You need to fix the error on line 19 and rebuild
hey i was wondering why cant i double+ double
oh nvm
hey im trying to print out an array but the output keeps coming out as this