For class I have to use a stack to find if a word entered by the user is a palindrome...
#include <iostream>
#include <string>
#include <stack>
using namespace std;
int main()
{
char *word; int count;
stack <char> mystack;
stack <char> rev_stack;
cout<<"Enter a string ";
cin>>word;
while(*word!=NULL)
{
mystack.push(*word);
word++;
}
while(mystack!=isEmpty())
{
rev_stack.push(mystack)
}
if(strcmp(mystack,rev_stack)==0)
cout<<"The word "<<word<<" is PALINDROME.";
else
cout<<"The word "<<word<<" is NOT PALINDROME.";
}
From this code I get:
error C3861: 'isEmpty': identifier not found
What is it that i need to do?