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. string to int

string to int

Scheduled Pinned Locked Moved C / C++ / MFC
tutorial
4 Posts 4 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.
  • S Offline
    S Offline
    si_69
    wrote on last edited by
    #1

    Hi does ne1 know how to convert a CString to an int eg CString = "5"; thanks si

    D Z M 3 Replies Last reply
    0
    • S si_69

      Hi does ne1 know how to convert a CString to an int eg CString = "5"; thanks si

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      atoi() comes to mind.

      1 Reply Last reply
      0
      • S si_69

        Hi does ne1 know how to convert a CString to an int eg CString = "5"; thanks si

        Z Offline
        Z Offline
        zeki yugnak
        wrote on last edited by
        #3

        hi.. you can do it,like this;

        CSting str;
        str="5132";
        int i=atoi(str);//i=5132

        Good Work...

        1 Reply Last reply
        0
        • S si_69

          Hi does ne1 know how to convert a CString to an int eg CString = "5"; thanks si

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

          http://www.codeproject.com/cpp/cppforumfaq.asp#cpp_atoi[^] --Mike-- Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber Latest art~!@#2rDFA#@(#*%$Rfa39f3fqwf--= NO CARRIER

          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