expression: (unsigned)(c+1) <= 256

So ya, this is my first post, but this is my current source code, the title is my error. Everywhere online I read about this error talks about how char has to be unsigned, because it can only be 255 or lower (which makes it odd that the error says <= 256), but when I attempt to change to unsigned, my page runs syntax errors for my returns from member functions, and for my "one.''(input)" calls. Any help would be appreciated, I'm sure I am just doing something tarded with my code.

#include <iostream>
#include <cmath>
#include <string>
#include <cctype>

using namespace std;

class CharConverter
{
private:
char input[100];
public:
string uppercase(string);
string properWords(string);
};

string CharConverter::uppercase(string)
{
for(int count = 0; count < 100; count++)
if(isalpha(input[count]))
input[count] = toupper(input[count]);

cout << "This word now looks like- " << endl << input[100] << endl;
return input;
}

string CharConverter::properWords(string)
{
bool cap_it = true;
for(int count = 0; count < 100; count++)
if((isalpha(input[count])) && cap_it == true)
{
input[count] = toupper(input[count]);
cap_it = false;
}
else if(isspace(input[count]))
cap_it = true;
else
cap_it = false;

cout << "This sentence now looks like- " << endl << input[100] << endl;
return input;
}

int main()
{
string input;
int choice = 0;

CharConverter one;

cout << "Please input a word or sentence- ";
cin >> input;
cout << "You entered " << input << endl;

cout << "Type 1 if you input a single word, 2 if you input a sentence," << endl;
cout << "3 if you wish to quit. ";
cin >> choice;

if(choice==1)
{
one.uppercase(input);
}
else if (choice==2)
{
one.uppercase(input);
}
else if (choice==3)
return 0;
else
cout << "Invalid choice. Please try again.";
return 0;
}

Also I originally wrote this as a char instead of string design, but then I realized my assignment said strings and I was starting to get confused on how I was to capitalize the first letter of every word in a single string, so that's why the code looks so awkward right now.
At what line do you get this error?
Topic archived. No new replies allowed.