I am trying to reverse a char* by using a stack.
stack<char> scrabble;
char* str = "apple";
while(*str)
{
scrabble.push(*str);
str++;
count++;
}
while(!scrabble.empty())
{
// *str = scrabble.top();
// str++;
scrabble.pop();
}
In the second While-loop, I'm not sure how to assign each char from the stack's top to the char* str.