Palindrome phrase instantiated from here error c++

I am struggling with this code. I know what I want to do, but I don't understand why I am getting an "instantiated from here" error. My code is supposed to be taking an input of a phrase including any spaces or punctuation and remove the spaces and punctuation to return whether or not the phrase is a palindrome.

bool isPhrasePalindrome (string phrase)

unsigned short k=0;
unsigned loop = 0;

for (loop =0; loop < (phrase.length()); loop++)
if (ispunct (phrase[loop]) || isspace (phrase[loop]))

for (k = 0; k < (phrase.length()/2); k++)
if (tolower(phrase[k]) != tolower(phrase[(phrase.length()-1-k]))
return false;

return true;
You forgot to enclose in curly braces the body of the function.
Sorry about that.

#include <iostream>;
#include <cctype>;

using namespace std;

bool isPhrasePalindrome (string phrase);

int main(void)

char run_program;
string input_word;
bool palin;

palin = false;
cout << "\nPlease enter your phrase to check: ";

cout << endl;

palin = isPhrasePalindrome(input_word);

if (palin)
cout << "The phrase is a palindrome";
cout << "The phrase is not a palindrome";

cout << "Do you have another phrase to check? ";
cin >> run_program;

while (tolower(run_program) == 'y');

return 0;

Topic archived. No new replies allowed.