Hey, ive been trying to get my actual program to work after this login screen here. But i simply cannot figure out how to do it, can anybody point me in the right direction? Thank you!
Line 36 is wrong. It compares the address of the pass array with the address of the string literal "Test" and clearly they are never the same.
To compare the contents of the pass array with "Test", use strcmp: if (strcmp(pass, "Test") == 0) {
But really you should use std::string for pass instead of a 32 byte array. At the very least, guard against the user entering more than 31 characters. Otherwise your code has a classic buffer overflow security bug.