C
C#13mo ago
StrixyBixy

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
No description
7 Replies
StrixyBixy
StrixyBixyOP13mo ago
No description
ZacharyPatten
ZacharyPatten13mo ago
the screenshot you shared doesn't even compile
StrixyBixy
StrixyBixyOP13mo ago
what do you mean
ZacharyPatten
ZacharyPatten13mo ago
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 error
Anu6is
Anu6is13mo ago
you 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
StrixyBixy
StrixyBixyOP13mo ago
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
StrixyBixy
StrixyBixyOP13mo ago
No description
Want results from more Discord servers?
Add your server