Okay, I started learning C++ yesterday and am really clueless. Probably much easier ways of doing things than I am but yea... I've made this really bad Username password thing and I wan't to make it so if the username and password are both correct then it outputs "correct" or something, but I can't. It has something to do with the if statement I think. I don't know how to make it check if both the username and password are correct... It works if I only check if the password is correct. I'm probably doing something completely wrong.
You are only testing for the password string. Change (password == "cheese") && (username == "hello") to ((password == "cheese") && (username == "hello")) to test for both "cheese" and "hello".
Using cin.ignore(); with cin>> password or cin>> username will still make the test fail even if both strings are entered correctly. On my Win 7 machine using TDM-GCC 4.9.2 the test condition fails.
I personally would use std::getline(std::cin, username); and std::getline(std::cin, password);.