Home > Back-end >  Inquire about VS the run - time check failure # 3 error problem
Inquire about VS the run - time check failure # 3 error problem

Time:10-01

I wrote a C language program, use VS2017 test, the program to compile, but after input data will play window shows the run - time check failure # 3, according to b not initialized, but I use the DEV C + + operation, after the input data did not show similar error, is this why? Below is a code, bosses, look me in the whole program is the function defines the b, affirmation is the problem here,
Char optr [7]={' + ', '-', '*', '/', '(',') ', '#'};
Int CMPTR [7] [7]=
,1,2,2,2,1,1 {{1},
,1,2,2,2,1,1 {1},
,1,1,1,2,1,1 {1},
,1,1,1,2,1,1 {1},
,2,2,2,2,3,0 {2},
,1,1,1,0,1,1 {1},
,2,2,2,2,0,3 {2}
};
{char precede (char e, char c)
Int a, b;
for (int i=0; I & lt; 7. I++) {
If (optr [I]==e) a=I;
If (optr [I]==c) b=I;
}
The switch (CMPTR [a] [b])
{
Case 1:
Return '& gt; ';
break;
Case 2:
Return '& lt; ';
break;
Case 3:
Return '=';
break;
Default:
Printf (" PRE ERROR! \n");
Return 1;
break;
}
}

CodePudding user response:

You B uninitialized, the DEBUG mode will prompt you for logical reasons, cause you might use uninitialized variables,

CodePudding user response:

reference 1st floor ggglivw response:
you B uninitialized, the DEBUG mode will prompt you for logical reasons, cause you might use uninitialized variables,

Oh yeah I know, that seems to be the problem caused b I wrote the assignment fails, the
Thank you big!
  • Related