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. Clist Find question

Clist Find question

Scheduled Pinned Locked Moved C / C++ / MFC
questionregex
6 Posts 2 Posters 4 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.
  • F Offline
    F Offline
    ForNow
    wrote on last edited by
    #1

    I have a Clist however the type is defined as a structure My question is I would like to match up against a member in the structure is this possible ? there maybe more that one occurence Thanks

    Richard Andrew x64R 1 Reply Last reply
    0
    • F ForNow

      I have a Clist however the type is defined as a structure My question is I would like to match up against a member in the structure is this possible ? there maybe more that one occurence Thanks

      Richard Andrew x64R Offline
      Richard Andrew x64R Offline
      Richard Andrew x64
      wrote on last edited by
      #2

      It's not clear what you're trying to do. Define "match up against a member in the structure". Maybe share a code sample.

      The difficult we do right away... ...the impossible takes slightly longer.

      F 1 Reply Last reply
      0
      • Richard Andrew x64R Richard Andrew x64

        It's not clear what you're trying to do. Define "match up against a member in the structure". Maybe share a code sample.

        The difficult we do right away... ...the impossible takes slightly longer.

        F Offline
        F Offline
        ForNow
        wrote on last edited by
        #3

        Consider the following structure

        struct stdecs
        {
        	struct vsmdesc stordesc;
        	char \*tcb = "         ";
        	struct blkdesc blkdescx;
        	CList freeblock;
        	CList allocblock;
        };
        

        with the following Clist definition

        CList storagediscriptor;
        

        Could I match for an equal against member tcb ? or any other member of the type stdesc thanks

        Richard Andrew x64R 1 Reply Last reply
        0
        • F ForNow

          Consider the following structure

          struct stdecs
          {
          	struct vsmdesc stordesc;
          	char \*tcb = "         ";
          	struct blkdesc blkdescx;
          	CList freeblock;
          	CList allocblock;
          };
          

          with the following Clist definition

          CList storagediscriptor;
          

          Could I match for an equal against member tcb ? or any other member of the type stdesc thanks

          Richard Andrew x64R Offline
          Richard Andrew x64R Offline
          Richard Andrew x64
          wrote on last edited by
          #4

          Sure, how about:

          stdecs anotherinstance;

          if (storagediscriptor[4].tcb == anotherinstance.tcb)...

          if (storagediscriptor[5].stordesc == anotherinstance.stordesc)...

          The difficult we do right away... ...the impossible takes slightly longer.

          F 1 Reply Last reply
          0
          • Richard Andrew x64R Richard Andrew x64

            Sure, how about:

            stdecs anotherinstance;

            if (storagediscriptor[4].tcb == anotherinstance.tcb)...

            if (storagediscriptor[5].stordesc == anotherinstance.stordesc)...

            The difficult we do right away... ...the impossible takes slightly longer.

            F Offline
            F Offline
            ForNow
            wrote on last edited by
            #5

            I would have to loop unitl storagediscriptor.GetNext == NULL inspecting the member which is not too bad thanks

            Richard Andrew x64R 1 Reply Last reply
            0
            • F ForNow

              I would have to loop unitl storagediscriptor.GetNext == NULL inspecting the member which is not too bad thanks

              Richard Andrew x64R Offline
              Richard Andrew x64R Offline
              Richard Andrew x64
              wrote on last edited by
              #6

              You're welcome!

              The difficult we do right away... ...the impossible takes slightly longer.

              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