{
cout << "Type internet to fix your internet connection: ";
cin.getline(solution,50);
if ((solution == "internet") || (solution == "Internet") || (solution == "INTERNET")){
system("ipconfig /flushdns");
system("ipconfig /release");
system("ipconfig /renew");
}
When I type internet,Internet,or INTERNET, it will not run the commands in the if statement. If i create an else statement and cout the solution value it says internet, yet when I type internet the if statement doesnt run. Could you tell me what is wrong with the code?
Also, instead of checking EVERY possible caps combination, why don't you try making a function that converts the inputted string to all caps or all lowercase?
Returns an integral value indicating the relationship between the strings:
A zero value indicates that both strings are equal.
A value greater than zero indicates that the first character that does not match has a greater value in str1 than in str2; And a value less than zero indicates the opposite.
Thanks, that fixed my first problem. For some reason though, now whenever I enter a value for the variable "solution",no matter what the value is it always runs both if statements anyway.