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";
    cin.getline(one_line,80);
    system ("pause");
    return 0;
    
}


void clean(CharPtr &u_input, CharPtr &pro_input)
{
     
     
}


void reverse (CharPtr &u_input, CharPtr &pro_input)
{

}

Recommended Answers

All 2 Replies

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.

You have just cut and pasted your project assignment , try to put some effort first.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.