Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Generic stack library in c

Generic stack library in c

Scheduled Pinned Locked Moved C / C++ / MFC
data-structureshelp
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    amitalonm
    wrote on last edited by
    #1

    Hello, I would like to get some ideas on writing a stack library using C language, that will as generic as possible It should support different data types - (handle strings, ints, chars, doubles, and other misc data types), different stack sizes, etc... I am open to hear about any ideas that may come, (See prototypes, and get some code if anybody happen to have it already) and/or will be happy if anyone can referee me to places with this issue already solved. Thanks.

    N _ T 3 Replies Last reply
    0
    • A amitalonm

      Hello, I would like to get some ideas on writing a stack library using C language, that will as generic as possible It should support different data types - (handle strings, ints, chars, doubles, and other misc data types), different stack sizes, etc... I am open to hear about any ideas that may come, (See prototypes, and get some code if anybody happen to have it already) and/or will be happy if anyone can referee me to places with this issue already solved. Thanks.

      N Offline
      N Offline
      Nemanja Trifunovic
      wrote on last edited by
      #2

      Generic Data Structures Library[^] apparently contains a stack implementation, so you can take a look at that.

      utf8-cpp

      1 Reply Last reply
      0
      • A amitalonm

        Hello, I would like to get some ideas on writing a stack library using C language, that will as generic as possible It should support different data types - (handle strings, ints, chars, doubles, and other misc data types), different stack sizes, etc... I am open to hear about any ideas that may come, (See prototypes, and get some code if anybody happen to have it already) and/or will be happy if anyone can referee me to places with this issue already solved. Thanks.

        _ Offline
        _ Offline
        _Superman_
        wrote on last edited by
        #3

        The Standard Template Library (STL) has a stack template class that you can use. http://www.cplusplus.com/reference/stl/stack/[^] http://www.codersource.net/c/standard-template-library/stack-stl-container-class.aspx[^]

        «_Superman_» I love work. It gives me something to do between weekends.
        Microsoft MVP (Visual C++)

        1 Reply Last reply
        0
        • A amitalonm

          Hello, I would like to get some ideas on writing a stack library using C language, that will as generic as possible It should support different data types - (handle strings, ints, chars, doubles, and other misc data types), different stack sizes, etc... I am open to hear about any ideas that may come, (See prototypes, and get some code if anybody happen to have it already) and/or will be happy if anyone can referee me to places with this issue already solved. Thanks.

          T Offline
          T Offline
          ThatsAlok
          wrote on last edited by
          #4

          try STL::Stack class for same!

          "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
          Never mind - my own stupidity is the source of every "problem" - Mixture

          cheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups