Help is needed on creating a pointer stack

This is a discussion on Help is needed on creating a pointer stack within the C Programming forums, part of the General Programming Boards category; Hi all: I need to create a stack that stores string pointers. But I do not really know how exactly ...

  1. #1
    Registered User
    Join Date
    Sep 2008
    Posts
    26

    Help is needed on creating a pointer stack

    Hi all:

    I need to create a stack that stores string pointers. But I do not really know how exactly I am going to start, can any one give me a hint?

    Thank you

  2. #2
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    I can give you recursive help.

  3. #3
    Registered User C_ntua's Avatar
    Join Date
    Jun 2008
    Posts
    1,853
    ^ looool :P

    Well, start by creating a struct that will be your stack. Then you will need to functions, pop() and push() that will get a parameter the stack and add/extract elements.

    Be more specific on what you want. For example, do you know how to create a basic linked list in C??

  4. #4
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    Heh... I guess I just get tired of telling people to post more... it makes me seem like I am jerk who never answers questions. So at least I am a jerk with a sense of humor who still wants more info. This is one area where C++ shines, yuzhangoscar. But I for one would never tell someone to drop C in exchange for C++ on a project.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. sorting number
    By Leslie in forum C Programming
    Replies: 8
    Last Post: 05-20-2009, 04:23 AM
  2. Replies: 9
    Last Post: 12-25-2007, 04:01 AM
  3. Finished Stack
    By the pooper in forum C Programming
    Replies: 11
    Last Post: 02-02-2005, 09:52 AM
  4. Quick question about SIGSEGV
    By Cikotic in forum C Programming
    Replies: 30
    Last Post: 07-01-2004, 07:48 PM
  5. error trying to compile stack program
    By KristTlove in forum C++ Programming
    Replies: 2
    Last Post: 11-03-2003, 05:27 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21