I've got this program that compares two words. Later on it changes the case of a word from uppercase to lowercase. I saw someplace on the web where a guy was doing this:
string lowerOrangeFruit = ConvertToLowerCase(orangeFruit)
He was including some header file called "strutils.h" and "genlib.h"
I tried it in my program but my compiler says no way.
Here is what I'm trying to do:
int main()
{
string guitar = "guitar"; // g has an ASCII code of 103
string piano = "Piano"; // P has an ASCII code of 80
cout << "Does " << guitar << " come before " << piano << "?" << endl << endl;
if (guitar < piano)
cout << "Yes!";
else
cout << "No!";
string lowerPiano = string.tolower(piano);
return 0;
}
But I'm doing something wrong. I sense that it must be a pretty easy fix. I'll have to keep monkeying around with it.