Thread: error: short, signed or unsigned invalid for `d'

  1. #1
    Registered User
    Join Date
    Dec 2005
    Location
    Colchester, Essex, United Kingdom.
    Posts
    31

    error: short, signed or unsigned invalid for `d'

    I have the following code:
    Code:
    #include <iostream>
    
    int main(){
      unsigned double d=25.0;
    }
    When compiling on Windows XP Professional with g++ 4.3.2, I get the error message described by the title. The program really could not be any simpler. What's wrong?

    Thanks,
    Tom.


    [edit]: That's g++ 3.4.2. Sorry.
    Last edited by tomcant; 03-24-2007 at 04:55 PM.

  2. #2
    The larch
    Join Date
    May 2006
    Posts
    3,573
    There simply is no such thing as unsigned doubles?

  3. #3
    Registered User
    Join Date
    Dec 2005
    Location
    Colchester, Essex, United Kingdom.
    Posts
    31
    Smashing point, anon. I can't believe my stupidity. Thanks.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 16
    Last Post: 10-29-2006, 05:04 AM
  2. Need Help Please
    By YouShallNotPass in forum C++ Programming
    Replies: 3
    Last Post: 08-22-2006, 11:22 AM
  3. Obtaining source & destination IP,details of ICMP Header & each of field of it ???
    By cromologic in forum Networking/Device Communication
    Replies: 1
    Last Post: 04-29-2006, 02:49 PM
  4. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM