Hello having some issues with my logic. I have to write a function that determines whether a given string is palindrome. I have to use multiple stacks for implementation. I have began coding and it compiles however it is not working correctly. I think the problem is within my while loop here is the code
#include <iostream>
#include <stack>
#include <string>
#include <cctype>
using namespace std;
int main()
{
string str;
stack<int> s1;
stack<int> s2;
cout << "This program will determine if a given string is a palindrome." <<endl;
cout << "Enter a string of characters from 1-100." << endl;
getline(cin, str);
for(int i = 0;i<(int)s1.size();i++)s1.push(i);
while(!s1.empty()) // this part reads stackOne into stackTwo.
{
s1.pop();//Removes the first character.
//s2.push();
}
if(s1 == s2)
{
cout << "It is a palindrome." << endl;
}
else
cout << "It is not a palindrome." << endl;
system("PAUSE");
return 0;
}