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. Conversion from int to char

Conversion from int to char

Scheduled Pinned Locked Moved C / C++ / MFC
help
6 Posts 5 Posters 2 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.
  • K Offline
    K Offline
    Kuroro Rucilful
    wrote on last edited by
    #1

    Hi everyone, please help me to convert integer type values to character type values. "You have to be in a situation where you see just how fast things fail to make you take it seriously, I guess. " Bruce Eckel

    C T H 3 Replies Last reply
    0
    • K Kuroro Rucilful

      Hi everyone, please help me to convert integer type values to character type values. "You have to be in a situation where you see just how fast things fail to make you take it seriously, I guess. " Bruce Eckel

      C Offline
      C Offline
      charlieg
      wrote on last edited by
      #2

      are you serious? let's see, method 1: CString sText; int nValue = 9901; sText.Format("%d", nValue); If CString is not your style, you can always sprintf. itoa will also get the job done. Charlie Gilley Will program for food... Whoever said children were cheaper by the dozen... lied. My son's PDA is an M249 SAW.

      K 1 Reply Last reply
      0
      • C charlieg

        are you serious? let's see, method 1: CString sText; int nValue = 9901; sText.Format("%d", nValue); If CString is not your style, you can always sprintf. itoa will also get the job done. Charlie Gilley Will program for food... Whoever said children were cheaper by the dozen... lied. My son's PDA is an M249 SAW.

        K Offline
        K Offline
        Kuroro Rucilful
        wrote on last edited by
        #3

        Thanks bro, i'm really serious :->... my friend actually ask me that a while ago. I'm digging in directx programming so i don't have time to recall. It's great coz i've learned itoa. Thanks..:-D "You have to be in a situation where you see just how fast things fail to make you take it seriously, I guess. " Bruce Eckel

        T 1 Reply Last reply
        0
        • K Kuroro Rucilful

          Thanks bro, i'm really serious :->... my friend actually ask me that a while ago. I'm digging in directx programming so i don't have time to recall. It's great coz i've learned itoa. Thanks..:-D "You have to be in a situation where you see just how fast things fail to make you take it seriously, I guess. " Bruce Eckel

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

          Kuroro Rucilful wrote:

          hanks bro, i'm really serious :->... my friend actually ask me that a while ago. I'm digging in directx programming so i don't have time to recall. It's great coz i've learned itoa. Thanks..:-D

          if Looking for Runtime Function then you can try _ttoi or _itot function

          "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
          • K Kuroro Rucilful

            Hi everyone, please help me to convert integer type values to character type values. "You have to be in a situation where you see just how fast things fail to make you take it seriously, I guess. " Bruce Eckel

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

            don't you know that char is also an integral type ? you can simply do this :

            int i = 2;
            char c = i;

            but maybe what you meant wasn't that but "converstion from int to C-Style strings" !?


            TOXCCT >>> GEII power

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

            1 Reply Last reply
            0
            • K Kuroro Rucilful

              Hi everyone, please help me to convert integer type values to character type values. "You have to be in a situation where you see just how fast things fail to make you take it seriously, I guess. " Bruce Eckel

              H Offline
              H Offline
              Hamid Taebi
              wrote on last edited by
              #6

              See maybe it is some helpful to you

              	CString str;
              	TCHAR  lpc[20];
              	TCHAR Buffer[20];
              	lpc[0]='\0';
              (1)	str.Format("%d",123);
              (2)	wsprintf(lpc,"%d",456);
              (3)	itoa(789,Buffer,10);
              

              _**


              **_

              whitesky


              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