• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

LPSTR to DWORD?

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    LPSTR to DWORD?

    In C++, what I want to do is append a DWORD with a LPSTR and get the composite varaiable to be a DWORD. Could anyone help?

    cheers

    #2
    ah

    Comment


      #3
      Re: ah

      He sees the light!

      Comment


        #4
        i haven't

        i haven't please help.

        ...mumble...C++ with its stupid variables..grumble

        why cant it just be string? or can it?

        Comment


          #5
          Re: i haven't

          I think you will find that nobody understands your question.

          The word "append" implies you possibly want a structure whereas wanting a DWORD at the end smacks of bit wise and or or.

          So try rephrasing the question and you might get an answer. Somebody like ScotsPine is your man but, as his comment the other day implied, he does not know whether to take your questions seriously or not. Ask clear thought out questions and you might get some help.

          Another thing, when you complain about C and C++ data types make sure you know what you are complaining about. There are a very simple set of native data types or primatives - char, short, int, long, float, double - which are easy to learn, whereas, in the Microsoft (spit) world there are huge numbers of typedef'ed data types such as DWORD and LPSTR. Somebody on here might be able to give you a potted history regarding Microsoft's need to complicate matters and the beauty of hungarian notation. Probably something to do with Intel chips and memory models.

          Comment


            #6
            Re: i haven't

            I always do all that crappy LPSTR, CString
            HWnd, CFile, CDoc, DDX etc. MFC bolloxy stuff for the UI and then at earliest opportunity I convert the user entries into good old C and continue happily using fopen and fread and char* and int and stuff in the technical bits.

            My VC++ code resembles a modern house in which you go through the front door and immediately decend into a victorian coal cellar full of ancient things that time mercifully forgot.

            Re question agree don't know what append really means here do you mean end up with what can be used as an array of DWORD? Giss example.

            Comment


              #7
              dword etc

              Just to add an agreement with OH and xoggoth. I didn't understand what is being done either.

              not being M$ I dont know how LPSTR / DWORD are. I guess a dword is 4char ? is lpstr the same size ?
              If you append then you end up with something larger...

              You haven't helped your case with your previous questions and your responses to people questioning what you are doing/what your abilities are. which isn't a good idea when you are asking for help. especially given that some questions could be answered by rtfm

              Comment


                #8
                dword etc.

                itoa

                Comment


                  #9
                  This ezboard thing

                  is total tulipe !!!>:

                  Comment


                    #10
                    re: F WORD

                    "Re question agree don't know what append really means here do you mean end up with what can be used as an array of DWORD? Giss example."


                    I want to treat an instance of LPSTR & and an instance DWORD as if they where 2 bits of string and attach them. The resultant variable should be a DWORD.

                    eg.

                    LPSTR = "one"
                    DWORD = "two"

                    DWORD="onetwo"

                    i guess it should be straightforward

                    Comment

                    Working...
                    X