Implementation of the Variable length integer in C
No. The compact size unsigned integers are not uints (except for the base one of one byte). They are a serialization, so it is actually just an array of bytes. You just compare the number you are serializing to the boundaries and determine from there what the prefix byte is. Bitcoin.org does a better job of describing this: https://bitcoin.org/en/developer-reference#compactsize-unsigned-integers. Note that you will need to understand hex numbers are and how they work in C.