Bool keeps returning false

My bool keeps returning as false even though it has been initialized true.

1
2
3
4
5
6
7
8
9
10
11
12
  // This is what im calling in main.cpp //
cout << "Admin:  " << users[userIn].getAdmin() << endl;

 // The function is as follows //
bool user::getAdmin()
{
	return admin;
}

 // Initial object definitions the third parameter being ADMIN //
user users[10] = { { 4, 55, true }, { 4, 55, false }, { 4, 55, false }, { 4, 55, false }, { 4, 55, false }, { 4, 55, false }, { 4, 55, false }, { 4, 55, false }, { 4, 55, false }, { 4, 55, false } };


im comparing the first object in the array so admin = true but the program is returning a 0 on the console when i run through my program.
did you verify that userIn = 0?


OMG DUDE THANK YOU SO MUCH I COMPLETELY SKIMMED OVER THE FACT AN ARRAY STARTS AT 0. Well i guess this is why im posting in the beginner section haha thanks a lot man!!!!
Topic archived. No new replies allowed.