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. Double

Double

Scheduled Pinned Locked Moved C / C++ / MFC
c++tutorialquestion
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.
  • C Offline
    C Offline
    cuongcntt2002
    wrote on last edited by
    #1

    Can you tell me how to check a String is double type in MFC? -- modified at 10:33 Sunday 14th May, 2006

    C H T 3 Replies Last reply
    0
    • C cuongcntt2002

      Can you tell me how to check a String is double type in MFC? -- modified at 10:33 Sunday 14th May, 2006

      C Offline
      C Offline
      Chris Losinger
      wrote on last edited by
      #2

      a string is a string, it is never a 'double' or any other type. if you want to check if a string represents a floating point number, you need to check for the obvious things: is it all numbers ? does it have an optional single decimal point ? a negative sign in front? an exponent at the end? etc. Cleek | Image Toolkits | Thumbnail maker

      1 Reply Last reply
      0
      • C cuongcntt2002

        Can you tell me how to check a String is double type in MFC? -- modified at 10:33 Sunday 14th May, 2006

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

        I agree with Chris Losinger string is string and ... I guess this link maybe it is some helpful to you here[^]_**


        **_

        whitesky


        1 Reply Last reply
        0
        • C cuongcntt2002

          Can you tell me how to check a String is double type in MFC? -- modified at 10:33 Sunday 14th May, 2006

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

          cuongbao197 wrote:

          Can you tell me how to check a String is double type in MFC?

          you have implement logic to find out that:- you have to check each character of string for Numeral(compulsory),Single 'e' (for exponent,optional) and single Decimal(compulsory). if any of condition fails thne string is definatly not a Float.

          "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

          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