In the last part of the video, the stack class was supplied with two templated datatypes, I’m not sure what this will hold or how are we going to use this, can you elaborate this point more and give an example as well please.
Problem with a concept from the video
Can somebody please reply to my query?
This is the link to the code-- https://ide.codingblocks.com/s/22256
Please answer this question in context to the above code
@chaturvedia336
pls read about templates then only that code will make any sense.
read this first->link
I know how template work, I’m having difficulty in understanding what this stack will hold in this particular question. Like by supplying 2 templated vector, will this stack hold two different values at a particular position?
it will store char in vector v and int in vector v2
So basically at any given position, the stack will be storing a value of two varying types, kind of a like a pair, right??
no , u have declared two different vector in ur stack class.
one vector is holding char and another is holding int
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.