void main () {
int t=1;
character uname[15],pwd[20];
again:
clrscr();
printf("Username:");
scanf("%s",&uname);
printf("password");
scanf("%s",&pwd);
int u = strcmp(uname"nhez");
int p = strcmp(pwd"cute");
if( (u == 0) && (p == 0) ) {
printf("Wellcome");
goto end;}
else{
printf("try again");
goto again;}
else{
t++1
if(t==6);{
printf("you are not allowed to access this page");
printf("press any key to continue...");
goto end;
getch();
end;}
getch();}
something like this but im not sure its just in my mind because my prof give us an assignment to make username and pass with character and number combi
when i run that program when i type the correct user and pass it goes normal but when i change the pass and put number and try to run again and fill with what i change it doesnt accept username
The code doesn't look like C/C++ code, only similar.
By "make username" you mean to accept username which has numbers or generate various usernames with numbers in them (from the code above it looks like you want to accept, just want to confirm)?
If you want to accept this in C++ then
1 2 3 4
string userName;
cout << "Enter username" << endl;
cin >> userName; //This should accept any string, like nhez123