I have this problem about queues. :(

So this is my problem.

Given an array of characters of specified size, store a string into the array and display in loop the output after executing the command deletion(s) and addition(s).

Sample Run:
Enter String: ILoveBacolod
Enter a command: Delete (D)
Output: LoveBacolod
Enter a command: Delete (D)
Output: oveBacolod
Enter a command: Add (A)
Enter a character: z
Output: oveBacolodz

Can you please give me a code that is similar to this. I'll just modify it. Thanks. :)
Afaik queues can not be read like that, they're merely container adapters making a FIFO structure. But your task asks about an array, the tutorial on this site may help you. http://www.cplusplus.com/doc/tutorial/arrays/
assuming that you are supposed to be implementing the queue, i think this is what you are looking for

@kefin, this is exactly how queues work, in at one end, out at the other.

Topic archived. No new replies allowed.