Weng Hou Weng Hou - 3 months ago 6
C++ Question

Why this code will cause my program to be stop working?

for(user=0;user<=max;user++)
{
name[user]=name1;
password[user]=password1;
}


after the program run to this loop it just stopped working and i need to terminate the program.How can I solve this problem?

Answer

Trying changing your code to:

for(user=0; user<max; user++)  // Remove the '=' sign
{
     name[user]=name1;
     password[user]=password1;
}