Solved below.
Original problem: How can I get comparisons against argv[] to be case-insensitive? Here is a code fragment:
if (std::string(argv[2]) == "HKCU") //Si escriben HKCU
{
cout << "Has escrito HKCU" << endl;
}
else //Si no escriben la clave
{
cout << "Debes especificar HCKU o HKLM" << endl;
}
If I pass the parameter "hkcu" the test does not work, I have to type "HKCU". If I compare for either "HKCU" or "hkcu" in the program either string will work.
EDIT: I had to use _stricmp (Using VS2013) this way:
if (_stricmp(argv[2], "HKCU") == 0)