Basic password authentication system app
Try using std::vector instead of arrays. As a result, you'll not be required to keep track of the array_size in a separate variable like n in your case.

Something like this:

std::vector&lt;std::string&gt; username;
username.push_back("admin");
//other entries go here
std::vector&lt;std::string&gt; password;
password.push_back("root");
//other entries go here


Then, the size of the std::vector is given by size().
Try to use proper names as variables. Avoid wrong spellings or short-names. Exact variable names make the code easy to understand, as the name represents the actual concept the variable is referring to.
Also, in registerUser() the variable answer can just be a char. This will help in saving a little memory.
Like:

char answer;
std::cin&gt;&gt;answer;
if(answer=='y' || answer=='Y')
{
    //code goes here
}

In your code, the method commandC() is defined to return an int. But it doesn't do so. Make the return type void instead.

void CommandC()
{
    //code goes here
}

Also, the main() method is defined to return an int too. It is a good practice to declare it like that, but make sure to return an integer. 0 (zero) is preferred as it refers to successful completion of main().

int main()
{
    //code goes here
    return 0; //indicates successful termination
}