Wrox Programmer Forums
|
C++ Programming General discussions for the C++ language. For questions specific to Microsoft's Visual C++ variant, see the Visual C++ forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C++ Programming section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old September 21st, 2004, 07:45 AM
Authorized User
 
Join Date: Aug 2004
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Spivonious
Default C++ Stack?

Does C++ have a stack type built-in, or must I make my own?

Reply With Quote
  #2 (permalink)  
Old September 21st, 2004, 08:37 AM
Registered User
 
Join Date: Sep 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

No In c/C+++ no such build_in class available. U have to create it by using class. If u known the concept of STACK and CLASS, then u can easily create a class. In VC++, some build_in classes are there for stack.
Reply With Quote
  #3 (permalink)  
Old September 21st, 2004, 10:05 PM
Authorized User
 
Join Date: Aug 2004
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Spivonious
Default

Okay, just checking if the newest version of c++ contained a stack. I guess I should brush up on my pointers :)

Reply With Quote
  #4 (permalink)  
Old September 22nd, 2004, 02:42 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 453
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via AIM to Ankur_Verma Send a message via MSN to Ankur_Verma
Default

STL has a template class called stack that you can use.
Reply With Quote
  #5 (permalink)  
Old September 25th, 2004, 06:48 AM
Registered User
 
Join Date: Sep 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to gemsuis Send a message via Yahoo to gemsuis
Default

Quote:
quote:Originally posted by Spivonious
 Does C++ have a stack type built-in, or must I make my own?

you have to make your own stack,because C++ dos't have any type of stack but you can make easily in c++
Reply With Quote
  #6 (permalink)  
Old October 6th, 2004, 01:13 PM
Registered User
 
Join Date: Oct 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You can use vector<> or deque<> for that purpose.
It should be available on any C++ compiler, except embedded C++.

Reply With Quote
  #7 (permalink)  
Old October 11th, 2004, 03:56 AM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 623
Thanks: 0
Thanked 1 Time in 1 Post
Default

I would prefer to make my own stack(however C++ offers me one).

--------------------------------------------
Mehdi.:)
Reply With Quote





Similar Threads
Thread Thread Starter Forum Replies Last Post
Stack Overflow Exception?? Apocolypse2005 Visual Basic 2005 Basics 2 January 17th, 2008 07:06 PM
Implementing a Stack navdeep C# 2005 1 October 28th, 2007 06:44 AM
Stack segment fuehrer C++ Programming 1 April 29th, 2005 01:59 AM
Stack question BrianWren VB.NET 2002/2003 Basics 1 December 30th, 2004 07:06 PM
XSLT Stack overflow diebald XSLT 2 September 1st, 2004 12:59 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.