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. Text to Long

Text to Long

Scheduled Pinned Locked Moved C / C++ / MFC
jsonquestion
8 Posts 6 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.
  • I Offline
    I Offline
    itkid
    wrote on last edited by
    #1

    Hi, I am getting the text data "12345" and i want to convert it into long data type 12345. Is there any API which do this? Thanks

    K S M 3 Replies Last reply
    0
    • I itkid

      Hi, I am getting the text data "12345" and i want to convert it into long data type 12345. Is there any API which do this? Thanks

      K Offline
      K Offline
      kakan
      wrote on last edited by
      #2

      long l = atol("12345");

      I 2 Replies Last reply
      0
      • I itkid

        Hi, I am getting the text data "12345" and i want to convert it into long data type 12345. Is there any API which do this? Thanks

        S Offline
        S Offline
        sunit5
        wrote on last edited by
        #3

        use atol

        1 Reply Last reply
        0
        • K kakan

          long l = atol("12345");

          I Offline
          I Offline
          itkid
          wrote on last edited by
          #4

          It would not give same 12345 number. I am not looking for long value of text "12345". I am looking for same number which text contain!! :)

          V E 2 Replies Last reply
          0
          • K kakan

            long l = atol("12345");

            I Offline
            I Offline
            itkid
            wrote on last edited by
            #5

            Thank you it's work

            1 Reply Last reply
            0
            • I itkid

              Hi, I am getting the text data "12345" and i want to convert it into long data type 12345. Is there any API which do this? Thanks

              M Offline
              M Offline
              Michael Dunn
              wrote on last edited by
              #6

              See the FAQ 6.3 How can I change a number into its string representation, or vice versa?[^] --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ

              1 Reply Last reply
              0
              • I itkid

                It would not give same 12345 number. I am not looking for long value of text "12345". I am looking for same number which text contain!! :)

                V Offline
                V Offline
                vikas amin
                wrote on last edited by
                #7

                I have checked atol it works fine i think it satisfies ur demand :cool: Vikas Amin Embin Technology Bombay vikas.amin@embin.com

                1 Reply Last reply
                0
                • I itkid

                  It would not give same 12345 number. I am not looking for long value of text "12345". I am looking for same number which text contain!! :)

                  E Offline
                  E Offline
                  Eytukan
                  wrote on last edited by
                  #8

                  kidding?


                  "But your mind is very complex, very tricky. It makes simple things complicated. -- that's its work. And for centuries it has been trained for only one thing: to make things so complicated that your life becomes impossible."- Osho

                  --[V]--

                  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