Thread: Conversion matter

  1. #1
    Registered User
    Join Date
    Apr 2007

    Conversion matter

    I ve got an issue with my calculator programme. The calculator is not in cosole but in window by the way.

    Anyway I do not know how to get the value which is typed in the display window so the computer understands the number and is able to work with it.

    The instruction I am looking for is some kind of
    of course some instruction which works for ints...

    Or another choice could be to convert the number from string to an int?
    of course this does not work in way from string to int.
    Do you have any ideas how to solve this?

    In general the only problem is that I am not able to get the displayed number as an int but as a string which does not work so well for calculator does it?

  2. #2
    Deathray Engineer MacGyver's Avatar
    Join Date
    Mar 2007
    This might help you:

    Alternatively you can get it as a string, and then call atoi(), or perhaps more preferably strtol().

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM
  2. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  3. Header File Question(s)
    By AQWst in forum C++ Programming
    Replies: 10
    Last Post: 12-23-2004, 11:31 PM
  4. Do I have a scanf problem?
    By AQWst in forum C Programming
    Replies: 2
    Last Post: 11-26-2004, 06:18 PM
  5. Creation of Menu problem
    By AQWst in forum C Programming
    Replies: 8
    Last Post: 11-24-2004, 09:44 PM