What is wrong with this:

for(int b = 0;b < c.length();b++)
      {
        temp[b] << S.Pop();  // or temp[b] = S.Pop();
      }

to have a string made up of the contents of the stack?

When I do this and cout << temp, temp is blank. This iterates through the loop properly, it just does not place the characters from the stack into the string.

Recommended Answers

All 2 Replies

please tell us more about your code

how have u declared temp....defination of pop() function

Sorry, I have managed to solve the issue.

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.