Thread: what type is .123

  1. #1
    Registered User blight2c's Avatar
    Join Date
    Mar 2002
    Posts
    266

    what type is .123

    hey all,

    i'm new to c++ and can't seem to find what data type a triple didgit decimal is (like .123). can anyone help?

  2. #2
    Registered User dirkduck's Avatar
    Join Date
    Aug 2001
    Posts
    428
    Well, you could use a float.

  3. #3
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    That would be a floating point data type. Generally all floating point numbers default to C++'s double.

    -Prelude
    My best code is written with the delete key.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. sorting the matrix question..
    By transgalactic2 in forum C Programming
    Replies: 47
    Last Post: 12-22-2008, 03:17 PM
  2. Replies: 0
    Last Post: 03-20-2008, 07:59 AM
  3. Little Array Difficulty
    By G4B3 in forum C Programming
    Replies: 16
    Last Post: 03-19-2008, 12:59 AM
  4. Replies: 28
    Last Post: 07-16-2006, 11:35 PM
  5. gcc problem
    By bjdea1 in forum Linux Programming
    Replies: 13
    Last Post: 04-29-2002, 06:51 PM