Take a look at the code below, when I enter the password "test" I get the message incorrect password.

Why is this. Also is there a way to define passwords via a text file.

And put a line break between printed messages.

And Auto display both lines? Without user input?


Code:
#include <iostream>

using namespace std;

int main()
{
char string[25];

    cout<<"Welcome to the UK Memory.com inventory system";
    cin.get();
    cout<<"Enter Your Password then press enter to continue!";
    cin>> string;
    cin.get();

    if (string == "test")
        cout<<"Welcome Karl";
    else {cout<<"Incorrect Password! Try Again";}

}