Thread: HELP PLEASE (Checking a int that contains a decimal point)

  1. #1
    Registered User
    Join Date
    Nov 2001
    Posts
    5

    Unhappy HELP PLEASE (Checking a int that contains a decimal point)

    Hi all im trying to check a integer which must contain a decimal point is there any function which does this!!!

    Example : 21.000

  2. #2
    Registered User kitten's Avatar
    Join Date
    Aug 2001
    Posts
    109
    There is no desimals in integer... period
    Making error is human, but for messing things thoroughly it takes a computer

  3. #3
    Registered User ski6ski's Avatar
    Join Date
    Aug 2001
    Posts
    133
    For decimals always use float
    Code:
    float number;
    number=21.1234;
    cout<<number;
    C++ Is Powerful
    I use C++
    There fore I am Powerful

  4. #4
    Registered User kitten's Avatar
    Join Date
    Aug 2001
    Posts
    109
    For decimals always use float
    Oh yeah... I forgot that
    Making error is human, but for messing things thoroughly it takes a computer

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how to combine these working parts??
    By transgalactic2 in forum C Programming
    Replies: 0
    Last Post: 02-01-2009, 08:19 AM
  2. For the numerical recipes in C types!
    By Smattacus in forum C Programming
    Replies: 5
    Last Post: 10-28-2008, 07:57 PM
  3. can some one please tell me the cause of the error ?
    By broli86 in forum C Programming
    Replies: 8
    Last Post: 06-26-2008, 08:36 PM
  4. Replies: 2
    Last Post: 03-24-2006, 08:36 PM
  5. How do you search & sort an array?
    By sketchit in forum C Programming
    Replies: 30
    Last Post: 11-03-2001, 05:26 PM