Give more context. It is highly unlikely that these would be the NAMES of variables. It is more likely that they would be VALUES, probably in an array of objects:
1 2 3 4 5 6 7
struct Person
{
string name;
bool hasRegistered = false;
};
Person people[100];
do you need text versions of their names?
enum the names as offsets into a vector of bool.
honestly, after your early schoolwork, this kind of thing is the type of data you would put into a file and read in, more often than not. Hard coded piles of data in serious programs usually end up being constants / lookup tables only, rarely are data/names 'variables' (meaning, opposite of constant) hard coded in bulk (you sometimes do this in test code, but that is to the side of the real code).
While I agree with the other suggestions, such as putting the values in a struct, or having an array, here is one way you can force the Visual Studio IDE to provide code folding:
1 2 3 4 5 6 7 8 9 10 11 12
#pragma region optional comment
bool Millie = false;
bool Al = false;
bool Rube = false;
bool Meg = false;
bool Luch = false;
bool Much = false;
bool Gordon = false;
bool Ed = false;
bool Joy = false;
bool Val = false;
#pragma endregion
Probably won't work with other IDEs.
Personally, I think excessive code folding (beyond just folding a function or struct) is generally a bad practice. If your code is becoming too unruly to read, then split it into multiple files or refactor it. Exceptions exist of course, perhaps a really long machine-generated file, or in C# where you can use regions to separate interface implementations from other methods.
Thank you ever so much @Ganado ,I'll take your comment as well, I suppose it can suggest I code in a manner which is un-commendable. Certainly somewhere to improve.
Thats been of great assistance, it's utterly useful.