I am trying to debug some homework but I am having trouble with these lines of code
#include "stdafx.h"
#include<conio.h>
#include<iostream>
#include<string>
using namespace std;
int main()
{
char word;
cout << "Enter a word and I will tell you whether it is" << endl <<
"in the first or last half of the alphabet." << endl <<
"Please begin the word with a lowercase letter. --> ";
cin >> word;
if(word[0] >= 'm')
cout << word << " is in the first half of the alphabet" << endl;
else
cout << word << " is in the last half of the alphabet" << endl;
return 0;
}
I get the following error and I have no clue what its sayings
error C2109: subscript requires array or pointer type