Probably a simple question. What are flags? Man this post is short! thanks
Probably a simple question. What are flags? Man this post is short! thanks
#include <Jesus.h>
It will save your life
Flags are settings, basically. Heres some flags for setting deimcal output to three spaces past the "."
cout << setiosflags(ios::fixed | ios::right | ios::showpoint)
<< setprecision(3);
Flags are variables a programmer uses to instead of logical conditions. For example suppose you read numbers from a file and you wish to find number 6. You create a loop and check if any number in the file matches 6. To terminate this loop you could use a flag, suppose an integer variable named 'found' which is equal to zero, until you find what you are looking for in the file. At that time found=1.
while (found!=1) {
...
}
So this loop terminates when 'found' has the value of 1. That's more or less the concept of a flag.
(Hope I was helpful...Maybe not! ;0) )
P.S: STOP THE WAR IN IRAQ! DROP BUSH, NOT BOMBS!