Palindrome emordnilaP

This is a discussion on Palindrome emordnilaP within the C++ Programming forums, part of the General Programming Boards category; Code: bool IsPalindrome(const char*d) {for(int s=strlen(*(&d))-1,i=0;s>i;*(&++i)) if(!(d[s-i]==d[i]))return(0);return(1);} wow, how pointless...

  1. #16
    Registered User
    Join Date
    Jul 2004
    Posts
    24
    Code:
    bool IsPalindrome(const char*d) 
    {for(int s=strlen(*(&d))-1,i=0;s>i;*(&++i))
    if(!(d[s-i]==d[i]))return(0);return(1);}
    wow, how pointless

  2. #17
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    both fail the case sensitivity test of ...

    A dog! A panic in a pagoda!

    but small point.
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Error in Recursive String Palindrome Code
    By clegs in forum C Programming
    Replies: 13
    Last Post: 12-21-2008, 12:36 PM
  2. Is it a Palindrome?
    By xp5 in forum C Programming
    Replies: 3
    Last Post: 09-06-2007, 06:26 AM
  3. bool palindrome definition
    By justinc911 in forum C++ Programming
    Replies: 3
    Last Post: 11-26-2003, 05:50 PM
  4. Palindrome Coding trouble
    By TheLoneWolf32 in forum C++ Programming
    Replies: 3
    Last Post: 02-22-2003, 07:05 PM
  5. palindrome HELP !!!
    By TED22_8 in forum C Programming
    Replies: 23
    Last Post: 01-22-2002, 02:14 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21