I want to use a unsigned int32, using gcc 4.3.3 on Ubuntu 9.04.
However, when I declare this:
unsigned int32 dev_number;
I get an compile error:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘dev_number’
Any suggestions?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’m sure exactly what you’re trying to achieve. Are you trying to have an unsigned int called int32? Or are you trying to have an unsigned 32 bit integer variable?
In the latter case, you can try to use stdint.h, which defines a set of types guaranteed (I believe?) to contain at least the set of bits specified.
In the former case, I can’t see why your line shouldn’t work.
prints
int32 = 42as expected.HTH