What is the error?
-
at line no 25 and 19
cout<<v.front is wrong
front is a function so write it as
cout<<v.front(); -
you can’t treat -1 as char because it is multicharacter you can take 1 or . as terminated character
-
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
and don’t forgot to mark doubt as resolved