Unsigned keyword in C++

Crystal picture Crystal · Jan 20, 2010 · Viewed 120k times · Source

Does the unsigned keyword default to a specific data type in C++? I am trying to write a function for a class for the prototype:

unsigned Rotate(unsigned object, int count)

But I don't really get what unsigned means. Shouldn't it be like unsigned int or something?

Answer

futureelite7 picture futureelite7 · Jan 20, 2010

From the link above:

Several of these types can be modified using the keywords signed, unsigned, short, and long. When one of these type modifiers is used by itself, a data type of int is assumed

This means that you can assume the author is using ints.