hello all I having a bit of trouble with this little bit of code. observe
Code:
#include <iostream.h>
int main()
{
const int NUMCHARS = 80;
char strng[80];
int i = 0;
char ToUpper(char ch);
cout<<"Enter a line of text\n";
cin.getline(strng,NUMCHARS);
while (strng[i] != '\0')
{
strng[i] = ToUpper(strng[i]);
i++;
}
cout<<"the string with uppercase letters";
cout<< strng <<endl;
return 0;
}
ToUpper(char ch)
{
if (ch >= 'a' && ch <= 'z')
return (ch - 'a' + 'A');
else
return(ch);
}
I keep getting error messages saying unresolved external. I've been reading oup on how to convert lower to uppercase letters and if there is an easier way any input would be appreciated thanks and God bless