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. Searching in SDK

Searching in SDK

Scheduled Pinned Locked Moved C / C++ / MFC
c++algorithmsquestion
11 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.
  • S shadrach_india

    I have bulk of data . I want to find a specific data from the bulk and doing some calculation on the data. i should not use STL Object(Map) or MFC:((. It should be a pure SDK. Can u suggest any build in functionality for this :confused:? Thanks in advance g.shadrach

    P Offline
    P Offline
    Prakash Nadar
    wrote on last edited by
    #2

    With limited information from you, probably a linked list or an array (probably array of pointers) can be used to do it.


    -Prakash

    T 1 Reply Last reply
    0
    • S shadrach_india

      I have bulk of data . I want to find a specific data from the bulk and doing some calculation on the data. i should not use STL Object(Map) or MFC:((. It should be a pure SDK. Can u suggest any build in functionality for this :confused:? Thanks in advance g.shadrach

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

      sorry, but STL is fully portable, because provided with the C++ language. it's not a Microsoft product :~


      TOXCCT >>> GEII power

      [VisualCalc 3.0  updated ][Flags Beginner's Guide  new! ]

      S 1 Reply Last reply
      0
      • T toxcct

        sorry, but STL is fully portable, because provided with the C++ language. it's not a Microsoft product :~


        TOXCCT >>> GEII power

        [VisualCalc 3.0  updated ][Flags Beginner's Guide  new! ]

        S Offline
        S Offline
        shadrach_india
        wrote on last edited by
        #4

        Hi I used the STL for my work , some time it throw exception while searching (map.find()). My project is a multithreaded. Each thread had it’s own map.

        T D 2 Replies Last reply
        0
        • S shadrach_india

          Hi I used the STL for my work , some time it throw exception while searching (map.find()). My project is a multithreaded. Each thread had it’s own map.

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

          were you using STL's std::map<> or MFC's CMap ?


          TOXCCT >>> GEII power

          [VisualCalc 3.0  updated ][Flags Beginner's Guide  new! ]

          S 1 Reply Last reply
          0
          • T toxcct

            were you using STL's std::map<> or MFC's CMap ?


            TOXCCT >>> GEII power

            [VisualCalc 3.0  updated ][Flags Beginner's Guide  new! ]

            S Offline
            S Offline
            shadrach_india
            wrote on last edited by
            #6

            STL's std::map<> Not MFC's CMap eg. map mapclass; mapclass mapobj; char searchkey[100]={0}; strcpy(searchkey,"somekey") try { mapobj.find(searchkey); } catch(...) { exception occurred ! } note : mostly occurred in Destructor of string class

            T 1 Reply Last reply
            0
            • S shadrach_india

              STL's std::map<> Not MFC's CMap eg. map mapclass; mapclass mapobj; char searchkey[100]={0}; strcpy(searchkey,"somekey") try { mapobj.find(searchkey); } catch(...) { exception occurred ! } note : mostly occurred in Destructor of string class

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

              and what kind of exception were thrown ? what were you doing ? [EDIT] Do you build your project with mutithreaded DLL (/MD or /MDd) ? [/EDIT]


              TOXCCT >>> GEII power

              [VisualCalc 3.0  updated ][Flags Beginner's Guide  new! ]

              S 2 Replies Last reply
              0
              • T toxcct

                and what kind of exception were thrown ? what were you doing ? [EDIT] Do you build your project with mutithreaded DLL (/MD or /MDd) ? [/EDIT]


                TOXCCT >>> GEII power

                [VisualCalc 3.0  updated ][Flags Beginner's Guide  new! ]

                S Offline
                S Offline
                shadrach_india
                wrote on last edited by
                #8

                STL's std::map<> Not MFC's CMap eg. map mapclass; mapclass mapobj; key[100]={0}; strcpy(ken,"somekey"); ------------ ------------ ------------ ------------ ------------ ------------ char searchkey[100]={0}; strcpy(searchkey,"somekey") try { mapobj.find(searchkey); } catch(...) { exception occurred ! } note : mostly occurred in Destructor of string class

                1 Reply Last reply
                0
                • T toxcct

                  and what kind of exception were thrown ? what were you doing ? [EDIT] Do you build your project with mutithreaded DLL (/MD or /MDd) ? [/EDIT]


                  TOXCCT >>> GEII power

                  [VisualCalc 3.0  updated ][Flags Beginner's Guide  new! ]

                  S Offline
                  S Offline
                  shadrach_india
                  wrote on last edited by
                  #9

                  hi my application is not dll. it is exe. but i didnot set multithread:sigh:

                  1 Reply Last reply
                  0
                  • P Prakash Nadar

                    With limited information from you, probably a linked list or an array (probably array of pointers) can be used to do it.


                    -Prakash

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

                    Mr.Prakash wrote:

                    probably a linked list

                    probably linked list is very slow at searching in compare to other datastructure

                    "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

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

                    1 Reply Last reply
                    0
                    • S shadrach_india

                      Hi I used the STL for my work , some time it throw exception while searching (map.find()). My project is a multithreaded. Each thread had it’s own map.

                      D Offline
                      D Offline
                      David Crow
                      wrote on last edited by
                      #11

                      shadrach_india wrote:

                      ...some time it throw exception while searching (map.find()).

                      So it threw an exception because you did something wrong, and now you are afraid to use it again. Where's the logic in that?


                      "Money talks. When my money starts to talk, I get a bill to shut it up." - Frank

                      "Judge not by the eye but by the heart." - Native American Proverb

                      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