Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please help me on this problem, a C++ program using Pointers, Polymorphism, and Memory Allocation. Instructions: Create a boolean function that has a parameter of
please help me on this problem,
a C++ program using Pointers, Polymorphism, and Memory Allocation.
Instructions:
- Create a boolean function that has a parameter of type string.
- Create two pointers, begin and end
- Point begin to the first character of the string and end to the last character of the string
- Create a while loop that continues to loop as long as begin and end, dereferenced, has the same value and begin and end are not pointing to the same thing.
- If at any point the dereferenced begin and the dereferenced end have different values, the loop should stop and the function will return false.
- If the loop can end without returning false, the function should then return true.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started