c++ using stack problem, Programming homework help

c++ using stack problem, Programming homework help

Text editors allow some character (e.g. ‘backspace’) to serve as an erase character, which has the effect of canceling the previous uncanceled character. For example, if ‘#’ is the erase character, then the string wr#et##az#c is really the string wac. The first ‘#’ cancels out r, the second e, the third t, and the fourth z.

Text editors also have a kill character, whose effect is to cancel all previous characters on the current line. For the purposes of this example, we will use ‘@’ as the kill character.

Finally, some text processing software has the ability to blank out a string of characters that represent confidential content. In our case, the delimiter to such a string will be ‘^’. So, the string of letters se^cre^t will be converted to se***t.

Design and write a C++ program that accepts input from a file and uses an STL stack of characters to process a line of text in the manner of a text editor. Use the standard operations of an STL stack for this purpose. Read each character and make a decision to push or pop or clear the stack. At the end, print out the residual string with the original ordering of letters

"You need a similar assignment done from scratch? Our qualified writers will help you with a guaranteed AI-free & plagiarism-free A+ quality paper, Confidentiality, Timely delivery & Livechat/phone Support.


Discount Code: CIPD30



Click ORDER NOW..

order custom paper