My instructor asked me to make a program using cstring that checks if program is palindrome. why its giving me "Argument of type "char" is incompatible with parameter of type "const char" error.
#include <iostream>
#include <cstring>
#include <string>
#include <sstream>
using namespace std;
int main()
{
string str = "";
int strcmpVal;
int length = str.length();
cout << "******************************" << endl;
cout << "PALINDROME" << endl;
cout << "******************************" << endl;
cout << "Enter a word: ";
getline(cin, str);
char* cStr = new char[str.length() + 1];
strcpy(cStr, str.c_str());
for (int i = 0; i < (length / 2); i++)
{
strcmpVal = strcmp(cStr[i],cStr[(length -1) -1]);
}
}