Reputation: 8518
What is the difference between unsigned
and unsigned int
?
This question was already answered for C (there is no difference):
Difference between unsigned and unsigned int in C
I am interested in knowing whether there is any practical difference in C++. Are they the same type?
Upvotes: 44
Views: 17905
Reputation: 38163
They are the same type, as in C. No differences at all.
Of course, unsigned
can be used as a qualifier for other integral types. But by default, unsigned
is the same as unsigned int
.
Upvotes: 62