Fatal Error C1094

too many 'flag' flags, 'string'

You used flag too many times. The last usage was with the parameter string.