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

This is a discussion on error: short, signed or unsigned invalid for `d' within the C++ Programming forums, part of the General Programming Boards category; I have the following code: Code: #include <iostream> int main(){ unsigned double d=25.0; } When compiling on Windows XP Professional ...

  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 05: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, 12:22 PM
  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, 03:49 PM
  4. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 07:39 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21