Home > Back-end >  Why C6201 mistake?
Why C6201 mistake?

Time:01-19

Part of the code is as follows:
 
#include
using namespace std;
Const int n=5;
Int main ()
{
Studnum int grade [n], [n].
Cout & lt; <"Enter student student number and grade:" & lt; for (int i=0; I & lt; n; I++)
Cin & gt;> Studnum [n] & gt;> Grade [n].


Then displayed
Warning C6201 index "5" beyond "0" to "4" effective range (for may be in the stack allocated buffer "studnum")
Warning C6201 index "5" beyond "0" to "4" effective range (for may be in the stack allocated buffer "grade")
But it should be no problem? Not i< again;=n

CodePudding user response:

Cin & gt;> Studnum [n] & gt;> Grade [n].====& gt;> Cin & gt;> Studnum [I] & gt;> Grade [I];
  • Related