Thread: Stacks and Vectors in C++
-
November 8th, 2009, 08:59 PM #1
Stacks and Vectors in C++
I am currently working on a project and need help with one part. We are not allowed to use the built in library for the stack, but instead must create one of our own. We haven't seen any examples of this, and were just told that we could use either a linked list or a vector, and we chose vector. Any help?
-
November 11th, 2009, 01:28 PM #2
Depends on the data too. A simple array would work if the data isn't too complicated (one or two dimensional array).
More complicated data would work in a linked-list for sure.
Just remember the basic rule of a stack (and you'll have to implement this in your code): Stacks are LIFO (Last In First Out) and this is accomplished with PUSH and POP operations.
You'll need the push and pop functions along with a pointer to the current location within the stack.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
how to do more advanced vectors.
By butch81385 in forum Graphic Design and Digital PhotographyReplies: 5Last Post: November 19th, 2005, 06:05 PM -
Vectors
By italiamodena575 in forum Graphic Design and Digital PhotographyReplies: 3Last Post: September 13th, 2005, 02:18 AM -
Vectors in PS??
By gentry_joey in forum Graphic Design and Digital PhotographyReplies: 2Last Post: July 22nd, 2005, 11:36 PM -
Photoshop Vectors
By gentry_joey in forum Graphic Design and Digital PhotographyReplies: 11Last Post: August 27th, 2003, 08:18 PM -
Vectors are cool
By Pshawn5 in forum IMO CommunityReplies: 3Last Post: January 10th, 2002, 03:20 PM



LinkBack URL
About LinkBacks





Reply With Quote

here you can see a comparison of the 7850 vs GTX 570 (GTX 560 Ti 448 is reduced spec 570, so the 448 Core would be close to the 7850 in performance, if not just behind it a hair): AnandTech |...
Suggested upgrades for a Gaming...