I need help with homework assignment for my Computer Science 2 course. We are learning about pointers and so this assignment focuses on that. My professor wanted me to use character pointers for the two strings but I can't seem to grasp character pointers so I tried string pointers because that seemed more logical since I was dealing with strings but I'm still getting error messages. I'm suppose to get the two strings from the user, determine the length of each string, determine if its a palindrome, then reverse it, then concat them and display all of that. If anyone can give me some advice it would be appreciated.
Use the char pointers as told. All pointers are pointers, but std::string is definitely not a char.
Were you told about C-strings? The convention that a '\0' character marks the end of an array of chars.
Do not make functions that do two things. Make a function that does one thing only.
For example, determines the length of a C-string. Return the value -- do not print anything from such function. Then you can call that function once for each C-string that you have.