I don't think they're is a function in the global header files to achieve this but here goes:
Code:
#include <iostream.h>
#include <string.h>
using namespace std;
void fUpper()
{
if ( ::pszInput == "jErRy" )
{
::pszInput = "Jerry"
cout << "Input capitalised." << endl;
}
}
int main()
{
string pszInput;
cout << "Please enter a word." << endl;
cin >> pszInput;
cout << "Thanks, it will now be capitalised." << endl;
fUpper();
return 0;
}
Bookmarks