5 Replies - 1123 Views - Last Post: 23 April 2007 - 08:07 AM Rate Topic: -----

#1 eugene1017  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 38
  • Joined: 22-April 07

Palindrome help needed

Posted 22 April 2007 - 12:14 PM

Hello, This (attached file) is to test whether a word from a user is a palindrome or not.
I can't get this to work.
This is re-eidted from some source I found on the internet by B. Massingill
I need help!


Thank you

Attached File(s)


Is This A Good Question/Topic? 0
  • +

Replies To: Palindrome help needed

#2 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 248
  • View blog
  • Posts: 13,506
  • Joined: 12-July 02

Re: Palindrome help needed

Posted 22 April 2007 - 12:42 PM

Can you specify the problem you are encountering? Along with any error messages being generated? Did the source file work before you changed what you found?
Was This Post Helpful? 0
  • +
  • -

#3 eugene1017  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 38
  • Joined: 22-April 07

Re: Palindrome help needed

Posted 22 April 2007 - 02:41 PM

View PostAmadeus, on 22 Apr, 2007 - 12:42 PM, said:

Can you specify the problem you are encountering? Along with any error messages being generated? Did the source file work before you changed what you found?



When I run the program, it says
"Enter a word..."
//i type in "deed"
deed

and the program doesn't progress from there. just give me a new line when I enter something else, just keeps giving me a new line without anything
Was This Post Helpful? 0
  • +
  • -

#4 eugene1017  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 38
  • Joined: 22-April 07

Re: Palindrome help needed

Posted 22 April 2007 - 04:03 PM

View Posteugene1017, on 22 Apr, 2007 - 02:41 PM, said:

View PostAmadeus, on 22 Apr, 2007 - 12:42 PM, said:

Can you specify the problem you are encountering? Along with any error messages being generated? Did the source file work before you changed what you found?



When I run the program, it says
"Enter a word..."
//i type in "deed"
deed

and the program doesn't progress from there. just give me a new line when I enter something else, just keeps giving me a new line without anything



runs but not working! i need help please help
can someone please check my code?!!

This post has been edited by eugene1017: 23 April 2007 - 07:41 AM

Was This Post Helpful? 0
  • +
  • -

#5 eugene1017  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 38
  • Joined: 22-April 07

Re: Palindrome help needed

Posted 23 April 2007 - 07:43 AM

[quote name='eugene1017' date='22 Apr, 2007 - 04:03 PM' post='219866']

View Posteugene1017, on 22 Apr, 2007 - 02:41 PM, said:

View PostAmadeus, on 22 Apr, 2007 - 12:42 PM, said:

Can you specify the problem you are encountering? Along with any error messages being generated? Did the source file work before you changed what you found?



When I run the program, it says
"Enter a word..."
//i type in "deed"
deed

and the program doesn't progress from there. just give me a new line when I enter something else, just keeps giving me a new line without anything



runs but not working! i need help please help
can someone please check my code?!!
Was This Post Helpful? 0
  • +
  • -

#6 BitByte  Icon User is offline

  • D.I.C Head

Reputation: 11
  • View blog
  • Posts: 194
  • Joined: 09-August 06

Re: Palindrome help needed

Posted 23 April 2007 - 08:07 AM

while(cin.get(temp) && temp != '\n' )


You need a condition to exit the loop. Otherwise it will keep asking for characters. When it hits the newline the loop will break and then check if it's a palindrome.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1