Home > Back-end >  How to settle this error for a great god
How to settle this error for a great god

Time:09-21

As shown in figure I wanted to design a registration and landing procedures but after enter the user name error when

CodePudding user response:

Post code out to know why

CodePudding user response:

No code, no truth

CodePudding user response:

Fun2 (char * c, char * d, char * u)
{int I; Char STR [4]={0};
Char on STC [4]={0};
Char a [8], [6] b;
Srand ((unsigned) time (NULL));
for(i=0; i<4. I++)
STR=[I] '0' + rand () % (' 9 '-' 0 ');
Printf (" your verification code to: % s \ n ", STR);

C=NULL, d=NULL, u=NULL;
The scanf (" % s ", & amp; C);
The scanf (" % s ", & amp; D);
The scanf (" % s ", & amp; U);

If (STRCMP (u, on STC & gt; 0)
Printf (" verification code error \ n ");
return 0;
If (STRCMP (a, c).=0 | | STRCMP (b, d)!=0)
Printf (" the user name or password mistake \ n ");
System (" exit ");
return 0;
}

CodePudding user response:

refer to the second floor CHXCHXKKK response:
no code, no truth
I posted here
I also find out the problem is that the STRCMP statement
As long as there is the problem

CodePudding user response:

reference 1/f, Simple, Soft reply:
post code out to know why
posts

CodePudding user response:

reference 4 floor ccaibi response:
Quote: refer to the second floor CHXCHXKKK response:
no code, no truth
I posted here
I also find out the problem is that the STRCMP statement
As long as there is the problem out

Here it is recommended to use strcpy, strcat, sprintf, STRCMP, strcasecmp string manipulation functions, such as easy to read/write cross-border appeared to target character string, should use the
Strncpy, strlcpy, strncat strlcat, snprintf, STRNCMP, strncasecmo function to prevent prone to read and write cross-border

CodePudding user response:

refer to 6th floor a1007885391 response:
Quote: refer to 4th floor ccaibi response:

Quote: refer to the second floor CHXCHXKKK response:
no code, no truth
I posted here
I also find out the problem is that the STRCMP statement
As long as there is the problem out

Here it is recommended to use strcpy, strcat, sprintf, STRCMP, strcasecmp string manipulation functions, such as easy to read/write cross-border appeared to target character string, should use the
Strncpy, strlcpy, strncat strlcat, snprintf, STRNCMP, strncasecmo function to prevent prone to read and write cross-border
used but is still the error

CodePudding user response:

refer to 7th floor ccaibi response:
Quote: refer to the sixth floor a1007885391 response:
Quote: refer to 4th floor ccaibi response:

Quote: refer to the second floor CHXCHXKKK response:
no code, no truth
I posted here
I also find out the problem is that the STRCMP statement
As long as there is the problem out

Here it is recommended to use strcpy, strcat, sprintf, STRCMP, strcasecmp string manipulation functions, such as easy to read/write cross-border appeared to target character string, should use the
Strncpy, strlcpy, strncat strlcat, snprintf, STRNCMP, strncasecmo function to prevent prone to read and write cross-border
used but is still the error

You sure mistake is in STRCMP, because your code a little problem, I can't reproduce
  • Related