I've found that all you really need to do is use the .flags parameter and just use = FLAG or = ~FLAG. the "~" is a bitwise inverter. it essentially reverses the effect of the flag (example: element.flags= VISIBLE; element is VISIBLE. element.flags= ~VISIBLE; element is now INVISIBLE).
Code:
void main()
{
cout << "I am MrCode,";
cout << "hear me roar!";
system("PAUSE");
}