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. Managed C++/CLI
  4. searchable void* container

searchable void* container

Scheduled Pinned Locked Moved Managed C++/CLI
helpdockertutorial
11 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 Amr Shahin

    hi every1 will u plz help me on this ... im creating a generic container class and im implemeting it using the (void*) pointer technique but to add a search feature, the search function should compare two (void*) variables, i dont know how to do that! i think memcmp could be used somehow but the problem that it needs a length parameter which is now available!! thanks already

    T Offline
    T Offline
    toxcct
    wrote on last edited by
    #2

    you are on the C++/CLI forum[^], while you question is for the Visual C++ forum[^] next time, be careful... and for you problem, do you code in C or C++ ? because C++ provides templates, that may certainly interrest you...

    A J 2 Replies Last reply
    0
    • T toxcct

      you are on the C++/CLI forum[^], while you question is for the Visual C++ forum[^] next time, be careful... and for you problem, do you code in C or C++ ? because C++ provides templates, that may certainly interrest you...

      A Offline
      A Offline
      Amr Shahin
      wrote on last edited by
      #3

      oh im sorry for this mistake anyway it doesnt really matter if its a c or c++ but for templates they are not compliant with the c++ standard so i think using the void* will be safer!!

      J T 3 Replies Last reply
      0
      • T toxcct

        you are on the C++/CLI forum[^], while you question is for the Visual C++ forum[^] next time, be careful... and for you problem, do you code in C or C++ ? because C++ provides templates, that may certainly interrest you...

        J Offline
        J Offline
        John M Drescher
        wrote on last edited by
        #4

        It looks like most questions for this forum are off topic... John -- modified at 9:16 Tuesday 7th March, 2006

        T N 2 Replies Last reply
        0
        • A Amr Shahin

          oh im sorry for this mistake anyway it doesnt really matter if its a c or c++ but for templates they are not compliant with the c++ standard so i think using the void* will be safer!!

          J Offline
          J Offline
          John M Drescher
          wrote on last edited by
          #5

          Amr Shahin wrote:

          oh im sorry for this mistake

          It's an easy mistake to make unless you read the main forum page that explains the topic of each forum: http://www.codeproject.com/script/comments/forums.asp[^] John

          1 Reply Last reply
          0
          • J John M Drescher

            It looks like most questions for this forum are off topic... John -- modified at 9:16 Tuesday 7th March, 2006

            T Offline
            T Offline
            toxcct
            wrote on last edited by
            #6

            John M. Drescher wrote:

            It looks like most questions for this forum are off topic...

            true, but if people had a look at the admin note... :doh:

            J 1 Reply Last reply
            0
            • A Amr Shahin

              oh im sorry for this mistake anyway it doesnt really matter if its a c or c++ but for templates they are not compliant with the c++ standard so i think using the void* will be safer!!

              T Offline
              T Offline
              toxcct
              wrote on last edited by
              #7

              Amr Shahin wrote:

              ut for templates they are not compliant with the c++ standard so i think using the void* will be safer!!

              are you on drugs ?! :wtf::omg: templates are part of and are defined in the standard !!!!! hey,, i think you should really revise you judgement about templates, and learn a bit more about them...

              1 Reply Last reply
              0
              • A Amr Shahin

                oh im sorry for this mistake anyway it doesnt really matter if its a c or c++ but for templates they are not compliant with the c++ standard so i think using the void* will be safer!!

                J Offline
                J Offline
                John M Drescher
                wrote on last edited by
                #8

                Amr Shahin wrote:

                i think using the void* will be safer!!

                Templates were not finalized until the mid to late 90s so compliers created before this may have a problem with them but as long as you stick to the basics and don't use partial template specialization and a few other features you will be fine on older compilers. I have been using templates for at least 5 years starting with VC6 (which is not fully compliant but very capable of using templates). void* is definitly not the way to go if you are using c++. John -- modified at 12:09 Tuesday 7th March, 2006

                1 Reply Last reply
                0
                • T toxcct

                  John M. Drescher wrote:

                  It looks like most questions for this forum are off topic...

                  true, but if people had a look at the admin note... :doh:

                  J Offline
                  J Offline
                  John M Drescher
                  wrote on last edited by
                  #9

                  Although I have seen it in the lounge I did not even notice it in this forum today... John

                  1 Reply Last reply
                  0
                  • J John M Drescher

                    It looks like most questions for this forum are off topic... John -- modified at 9:16 Tuesday 7th March, 2006

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

                    John M. Drescher wrote:

                    It looks like most questions for this forum are off topic...

                    True, but i blame MS marketing for this. Most people consider CLI to be "command line interface", not "common language..." (what the heck is I for anyway?).


                    My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.

                    T 1 Reply Last reply
                    0
                    • N Nemanja Trifunovic

                      John M. Drescher wrote:

                      It looks like most questions for this forum are off topic...

                      True, but i blame MS marketing for this. Most people consider CLI to be "command line interface", not "common language..." (what the heck is I for anyway?).


                      My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.

                      T Offline
                      T Offline
                      toxcct
                      wrote on last edited by
                      #11

                      Nemanja Trifunovic wrote:

                      (what the heck is I for anyway?).

                      Common Language Infrastructure... :doh: :cool:

                      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