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. STL Questions

STL Questions

Scheduled Pinned Locked Moved C / C++ / MFC
c++questiondiscussion
7 Posts 5 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.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    Does anyone have any opinions on using the STL... Is there any reason not to use it? I seem to spend a lot of time implementing things like linked lists, but have recently started using the STL. A lot of people take the view that there is no point reinventing the wheel and making things harder for yourself. Although I do like to know exactly how my programs work, am I really just creating more work for myself. Secondly, should I be able to get at the STL in a console app. Im thinking maybe I need to include some header files, which ones might they be? Finally, whilst Im here can I also ask whats the difference between including things with < and >, and in speech marks... thanks ben

    L C M S 5 Replies Last reply
    0
    • L Lost User

      Does anyone have any opinions on using the STL... Is there any reason not to use it? I seem to spend a lot of time implementing things like linked lists, but have recently started using the STL. A lot of people take the view that there is no point reinventing the wheel and making things harder for yourself. Although I do like to know exactly how my programs work, am I really just creating more work for myself. Secondly, should I be able to get at the STL in a console app. Im thinking maybe I need to include some header files, which ones might they be? Finally, whilst Im here can I also ask whats the difference between including things with < and >, and in speech marks... thanks ben

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      It's great. However, you might want to check out http://www.stlport.org since there are some bugs etc. in M$'s impementation.

      1 Reply Last reply
      0
      • L Lost User

        Does anyone have any opinions on using the STL... Is there any reason not to use it? I seem to spend a lot of time implementing things like linked lists, but have recently started using the STL. A lot of people take the view that there is no point reinventing the wheel and making things harder for yourself. Although I do like to know exactly how my programs work, am I really just creating more work for myself. Secondly, should I be able to get at the STL in a console app. Im thinking maybe I need to include some header files, which ones might they be? Finally, whilst Im here can I also ask whats the difference between including things with < and >, and in speech marks... thanks ben

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        I too have recently started using the STL. To use it in a console app you include the appropriate header file(s) (e.g. vector, map, string, etc.) using the angled brackets. The .h is not used when naming STL header files. The difference between using angled brackets and quotation marks is easy. If an include file is in quotation marks the compiler reads it from the current directory. If it is in angled brackets the compiler searchs the include path for the file. >>>-----> MikeO

        M 1 Reply Last reply
        0
        • L Lost User

          Does anyone have any opinions on using the STL... Is there any reason not to use it? I seem to spend a lot of time implementing things like linked lists, but have recently started using the STL. A lot of people take the view that there is no point reinventing the wheel and making things harder for yourself. Although I do like to know exactly how my programs work, am I really just creating more work for myself. Secondly, should I be able to get at the STL in a console app. Im thinking maybe I need to include some header files, which ones might they be? Finally, whilst Im here can I also ask whats the difference between including things with < and >, and in speech marks... thanks ben

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          I think you're right on the money. It's great that you've taken the time to understand how a linked list is implimented, but now you should go on to use the STL. It is an awesome set of tools, the more I learn about it, the more I wish I had time to learn about it. Christian #include "std_disclaimer.h" People who love sausage and respect the law should never watch either one being made. The things that come to those who wait are usually the things left by those who got there first.

          1 Reply Last reply
          0
          • L Lost User

            I too have recently started using the STL. To use it in a console app you include the appropriate header file(s) (e.g. vector, map, string, etc.) using the angled brackets. The .h is not used when naming STL header files. The difference between using angled brackets and quotation marks is easy. If an include file is in quotation marks the compiler reads it from the current directory. If it is in angled brackets the compiler searchs the include path for the file. >>>-----> MikeO

            M Offline
            M Offline
            Michael Dunn
            wrote on last edited by
            #5

            One correction - when #include'ing a file in quotes, if the file isn't in the current directory, the preprocessor then searches the INCLUDE path. --Mike-- http://home.inreach.com/mdunn/ #include "buffy_sig"

            1 Reply Last reply
            0
            • L Lost User

              Does anyone have any opinions on using the STL... Is there any reason not to use it? I seem to spend a lot of time implementing things like linked lists, but have recently started using the STL. A lot of people take the view that there is no point reinventing the wheel and making things harder for yourself. Although I do like to know exactly how my programs work, am I really just creating more work for myself. Secondly, should I be able to get at the STL in a console app. Im thinking maybe I need to include some header files, which ones might they be? Finally, whilst Im here can I also ask whats the difference between including things with < and >, and in speech marks... thanks ben

              M Offline
              M Offline
              Mukkie
              wrote on last edited by
              #6

              I recommend Hewlett Packard implementation, it is free and - that's my opinion - better then Ms implementation. Use STL and save money. Just like when writing 3d applications, use fe.: OpenGL or DirectX.

              1 Reply Last reply
              0
              • L Lost User

                Does anyone have any opinions on using the STL... Is there any reason not to use it? I seem to spend a lot of time implementing things like linked lists, but have recently started using the STL. A lot of people take the view that there is no point reinventing the wheel and making things harder for yourself. Although I do like to know exactly how my programs work, am I really just creating more work for myself. Secondly, should I be able to get at the STL in a console app. Im thinking maybe I need to include some header files, which ones might they be? Finally, whilst Im here can I also ask whats the difference between including things with < and >, and in speech marks... thanks ben

                S Offline
                S Offline
                skfnmuisl dmufa oi
                wrote on last edited by
                #7

                Hi. > Finally, whilst Im here can I also ask whats the difference between including things > with < and >, and in speech marks... Easy: #include searches stdio.h in the defined include directories while #include "stdio.h" searches the file first in the current directory and then in the standard include dirs. Thus, use <> for standard files or standard modules you use often and "" for your own files the current project. Karl Pseudocode is code to demonstrate a concept, not designed to be run. Like certain Microsoft software.

                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