I have some input flags in a C++ program, they all start out false. I thought it might be nice, if I could initialize all of them to false. So I tried:
bool flagA, flagB, flagH = false;
but the flags did not get set properly, when I tried this. flagA evidently was initialized as true? Setting the flags explicitly works.
bool flagA = false;
bool flagB = false;
bool flagH = false;
I am using g++, and I do not get compiler errors or warnings. I know the program is misbehaving because flagA when set true sends program output to the local printer. Just wondering.