trouble with pointers HELP MEEEE???
HELLO all it's me once again I've just read up on the section on pointers and all the book did was leave me dazed and confused. I built this program observe.
Code:
#include <iostream.h>
int main()
{
const int NUMCHARS = 80;
char strng[NUMCHARS];
char c;
char ToUpper(char ch);
cout<<"Enter a line of text\n";
cin.getline(strng,NUMCHARS);
while ((c = *strng++) != '\0')
{
c = ToUpper(*strng);
}
cout<<"the string with uppercase letters\n";
cout<< c <<endl;
return 0;
}
char ToUpper(char ch)
{
if (ch >= 'a' && ch <= 'z')
return (ch - 'a' + 'A');
else
return(ch);
}
alrighty everything looks like it should run smoothly but I keep getting an error in regards to the "++" any input would be much appreciated thank you