stack as a function parameter in c++?

i'm just learning implementation with stl stacks and queues and i'm not really familiar with them yet. can you make a function that takes an stl stack or queue as a parameter??? if so whats the syntax? the function will take in the stack and push a few values and either return the stack or pass it by reference. is this possible?

Try google.com and put in stack function. There is an example that you might like.

Best Answer

My opinion would be that it is a normal class / object, and you should be able to pass it as a parameter.

I would be more inclined to pass it as a pointer to the stack, rather than the whole stack itself. Therefore, you would be passing be reference.

I do not think you would have to return the stack, as you could change the contents whilst in this function, and upon returning from the function the stack that you passed as reference would contain the changes made in the function.

30 Related Question Answers Found Date
Microsoft word? 2022-01-19 06:09
Help with html form redirect function - how do you redirect to external site after form submitted? 2022-01-19 06:09
How do i create a Java Library Maintenance System. Any recommended website for me to refer? 2022-01-19 06:04
How do i change the background of my picture using Adobe photoshop? 2022-01-19 06:04
what is RSS( technology) , advantage and disadvantage, funtion or system of RSS? 2022-01-19 05:57
is java programmer is also called java developer?please explain if there is a difference? 2022-01-19 05:38
How do you create a lead capture page by yourself? 2022-01-19 05:33
Can anyone tell me, concisely, the differences between vb, vb6, vbscript, vbnet? 2022-01-19 05:13
What does the suffix .INI in BOOT.INI mean? 2022-01-19 05:12
Is there a free software to to send direct html e-mail? 2022-01-19 04:57
write a program to add two numbers without using arithmetic opereations ( +,-,*,/,%)? 2022-01-19 04:57
Trigger Delete in SQL? 2022-01-19 04:40
???.net it's urgent !? 2022-01-19 04:18
hi frnds, which book is the best for pl sql "brush up" learning with "interview" point of view? 2022-01-19 04:13
can you plz explain me with this? 2022-01-19 04:00
How in C programming,we can assign a float value to a char value? 2022-01-19 03:54
How do I change my windows title bar using dreamweaver? 2022-01-19 03:44
What is the function of 'post slug' when writing a post in WordPress? 2022-01-19 03:43
Question about visual c++? 2022-01-19 03:42
Visual Basic 6 ADO problem? 2022-01-19 03:37
Why do a lot of ERP implementaions fail?javascript:void(0);? 2022-01-19 03:25
hello , plz where i could find a free library"" psd files ""specially landscape images? 2022-01-19 03:24
Where do I get a good tutorial for SAP & ABAP programming online for free? 2022-01-19 03:13
How can I access samba shared folder in the shell(linux)? 2022-01-19 03:13
Any GOOD web page designers you can trust on line? 2022-01-19 03:03
How can I animate my picture? 2022-01-19 02:54
my C programs are compiling with no error in turbo c++ 3.0..bt i am not able to see the output???plz help..? 2022-01-19 02:46
phpbb upgrade within php-nuke? 2022-01-19 02:31
how do i get? 2022-01-19 02:23
who composed the theme music you hear when you open windows xp? 2022-01-19 02:21