What is the error?

  1. at line no 25 and 19
    cout<<v.front is wrong
    front is a function so write it as
    cout<<v.front();

  2. you can’t treat -1 as char because it is multicharacter you can take 1 or . as terminated character

  3. at line no 18 this is wrong
    you have to pop element inside the while loop

Modified Code

if you want to ask something about this feel free to ask
i hope this helps
if yes show your response with :heart: and don’t forgot to mark doubt as resolved