My compiler complains of '}' syntax errors all over the place in this function. I have to comment out the IF statements and their closing brackets (not the enclosed statements) to get it to compile. Take a look, and tell me if you see any problems.
PHP Code:
bool checkArgs(int count, char *value[]) {
char *val;
for (int i = 1; i<count; i++) {
val = value[i];
if (val[1] == '-') // True if a switch is used
if (val[2] == 'A') // 'A'dmin privileges
cout << val << ": Admin Privileges Granted.\n";
}
}
}
return true;
}