Why typedef can not be used with static? For example, the code below is an error
typedef static int INT2;
What other rules should be follow to use the typedef? What other keywords can not be used with typedef?
Thanks so much!
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.
typedef doesn’t declare an instance of a variable, it declares a type (type alias actually),
staticis a qualifier you apply to an instance, not a type, so you can use static when you use the type, but not when you define the type. Like this..