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. CString convert error in Embedded Visual C++

CString convert error in Embedded Visual C++

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

    i want to convert the interger to a binary string in EVC.so i use the '_itot'. UINT16 high16data = dwReadValue; CString high16string = _itot(high16data, high16string, 2); the error is:error C2664:'_itow':cannot convert parameter 2 from 'const unsigned short *' how can i convert the parameter?(i do want to use the CString type not the char[] as showed in MSDN). so how to do it? thanks for helping.

    i 've tried ,then i have no regret

    E 1 Reply Last reply
    0
    • C CHYGO

      i want to convert the interger to a binary string in EVC.so i use the '_itot'. UINT16 high16data = dwReadValue; CString high16string = _itot(high16data, high16string, 2); the error is:error C2664:'_itow':cannot convert parameter 2 from 'const unsigned short *' how can i convert the parameter?(i do want to use the CString type not the char[] as showed in MSDN). so how to do it? thanks for helping.

      i 've tried ,then i have no regret

      E Offline
      E Offline
      eusto
      wrote on last edited by
      #2

      _itot does not accept a CString as parameter. you have to pass a TCHAR* as the second parameter. Why don't you use CString::Format?

      C 1 Reply Last reply
      0
      • E eusto

        _itot does not accept a CString as parameter. you have to pass a TCHAR* as the second parameter. Why don't you use CString::Format?

        C Offline
        C Offline
        CHYGO
        wrote on last edited by
        #3

        CString::Format maybe a good choice,i'll try it tomorrow:)

        i 've tried ,then i have no regret

        E 1 Reply Last reply
        0
        • C CHYGO

          CString::Format maybe a good choice,i'll try it tomorrow:)

          i 've tried ,then i have no regret

          E Offline
          E Offline
          Eugen Podsypalnikov
          wrote on last edited by
          #4

          CHYGO wrote:

          i'll try it tomorrow :)

          It will be a good day :)

          virtual void BeHappy() = 0;

          C 1 Reply Last reply
          0
          • E Eugen Podsypalnikov

            CHYGO wrote:

            i'll try it tomorrow :)

            It will be a good day :)

            virtual void BeHappy() = 0;

            C Offline
            C Offline
            CHYGO
            wrote on last edited by
            #5

            it is an good day :-D

            i 've tried ,then i have no regret

            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