paperjam
paperjam

Reputation: 8518

Difference between unsigned and unsigned int in C++

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

Answers (1)

Kiril Kirov
Kiril Kirov

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

Related Questions