+ 1
Can somebody help with strings
How do I create 'newEvent' with a new name (115 line). Like I "undo" last Event and putting back but with a new name For example if I wanted to take last Event and make the Row bigger(+10) I would do it like this 115 newEvent = top(&EventStack); 116 pop(&EventStack) ; 117 newEvent.row += 10; 118 push(&EventStack, newEvent) ; 119 print(&EventStack); But how do you do it with a string? https://code.sololearn.com/c98cLKBdf21B/?ref=app
6 Réponses
+ 3
zaya1235
But what is the exact problem? I ran the code with 4 inputs and it worked fine for me. Please explain what is the output you are expecting.
And also, Martin Taylor is talking about the `stack` *class* in the C++ standard library *that implements the stack data structure*. He is not talking about the stack data structure itself.
+ 1
XXX I've already fixed the error
It should change the name of the last element in the stack
"Event" - > "Club"
0
Martin Taylor there's just push/pop/top functions and in main I'm adding 4 events to the stack and then I'm adding 5 more events. Taking out last 2 events
And then I wanted to make new Event but with a different name
0
Martin Taylor and also its not a class
It's a structure