hi i'm new to c++ and i really would appreaciate it if someone could help me plz!
i have to create aprogram to identify palindromes using character arrays and pointers. it shd continue requesting the user for phrases until quit is entered. i have t o use the following:
-type def to define a type called CharPtr
-the phrases are 80 charcters and less
-void function1(CharPtr &a, CharPtr &b)
cleans the input and converts letters to uppercase/lowercase
one pointer is for user input and the other one is for processed input
-void function2(CharPtr &a, CharPtr &b)
reverses a C string by first swapping the first and last characters, then swapping teh second and second last charcters...

so far i've only gotten this much:

#include <iostream>
#include <string>
#include <iomanip>
#include <cctype>

typedef char* CharPtr;
void clean(CharPtr &u_input, CharPtr &pro_input);
void reverse(CharPtr &u_input, CharPtr &pro_input);

int main()
    using namespace std;
    CharPtr p;
    char one_line[80];
    cout<<"Enter a candidate for palindrome test: \n";
    system ("pause");
    return 0;

void clean(CharPtr &u_input, CharPtr &pro_input)

void reverse (CharPtr &u_input, CharPtr &pro_input)


What exactly are you having problems with? You have a good base there already, all you need to do is fill in those functions and use them. The implementation of the functions should not be too difficult if you think it through.

This article has been dead for over six months. Start a new discussion instead.