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#
  4. Integer to a String

Integer to a String

Scheduled Pinned Locked Moved C#
tutorial
7 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.
  • P Offline
    P Offline
    Paul Swet
    wrote on last edited by
    #1

    I would like to know how to convert from integer to a string, actually I would like to know how to implement the function 'itoa()'. Please provide C code. Thanks.

    S S 2 Replies Last reply
    0
    • P Paul Swet

      I would like to know how to convert from integer to a string, actually I would like to know how to implement the function 'itoa()'. Please provide C code. Thanks.

      S Offline
      S Offline
      Stefan Troschuetz
      wrote on last edited by
      #2

      Simply call the ToString method of your int variable.


      www.troschuetz.de

      P 1 Reply Last reply
      0
      • P Paul Swet

        I would like to know how to convert from integer to a string, actually I would like to know how to implement the function 'itoa()'. Please provide C code. Thanks.

        S Offline
        S Offline
        sreejith ss nair
        wrote on last edited by
        #3

        hi, int A=8; string b=A.ToString(); :) And i am not getting what you mean to explain through this 'itoa()'. Will explain this ?:doh: ************************** S r e e j i t h N a i r **************************

        P 1 Reply Last reply
        0
        • S Stefan Troschuetz

          Simply call the ToString method of your int variable.


          www.troschuetz.de

          P Offline
          P Offline
          Paul Swet
          wrote on last edited by
          #4

          Thank you but I need the code without calling any library function.

          1 Reply Last reply
          0
          • S sreejith ss nair

            hi, int A=8; string b=A.ToString(); :) And i am not getting what you mean to explain through this 'itoa()'. Will explain this ?:doh: ************************** S r e e j i t h N a i r **************************

            P Offline
            P Offline
            Paul Swet
            wrote on last edited by
            #5

            Thank you but I need the code without calling any library function.

            C B 2 Replies Last reply
            0
            • P Paul Swet

              Thank you but I need the code without calling any library function.

              C Offline
              C Offline
              Colin Angus Mackay
              wrote on last edited by
              #6

              First, I don't think that is possible. You are going to have to call some part of the .NET Framework at some point. Second, why don't you want to call "any library function"?


              Do you want to know more? Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!

              1 Reply Last reply
              0
              • P Paul Swet

                Thank you but I need the code without calling any library function.

                B Offline
                B Offline
                Brian Delahunty
                wrote on last edited by
                #7

                ok... but creating an "int" you are using the .NET BCL (base class library). By creating a string you are using the .NET BCL... I think you must be after something in C, not C#. Check the C++ forum. Regards, Brian Dela :-) http://www.briandela.com IE 6 required.
                http://www.briandela.com/pictures Now with a pictures section :-D
                http://www.briandela.com/rss/newsrss.xml RSS Feed

                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