unsigned

This is a discussion on unsigned within the C++ Programming forums, part of the General Programming Boards category; Unsigned is defined as unsigned int, am I right?...

  1. #1
    l2u
    l2u is offline
    Registered User
    Join Date
    May 2006
    Posts
    630

    unsigned

    Unsigned is defined as unsigned int, am I right?

  2. #2
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,581
    No. Not anymore. int is no longer the default type. You should name your types.

    The contrary is true though. short, int and long are signed by default.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  3. #3
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    Is there any default type anymore?

    I hope it's not anything silly
    "The Internet treats censorship as damage and routes around it." - John Gilmore

  4. #4
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    Quote Originally Posted by Mario F.
    No. Not anymore.
    No type at all is no longer substituted by int, but a simple unsigned is still the same as unsigned int. See C++98, 7.1.5(2) and 7.1.5.2(1), the latter of which lists all valid combinations of simple type specifiers.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 12
    Last Post: 08-12-2008, 12:02 AM
  2. Heap corruption using zlib inflate
    By The Wazaa in forum C++ Programming
    Replies: 0
    Last Post: 03-29-2007, 01:43 PM
  3. Replies: 16
    Last Post: 10-29-2006, 05:04 AM
  4. 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

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