Has anyone ever seen the storage class auto explicitly used in C/C++? If so, in what situation?
Has anyone ever seen the storage class auto explicitly used in C/C++? If so,
Share
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.
auto is never useful in current C/C++ because all variables are implicitly auto. It is useful in C++0x, where it can replace the type declaration entirely – if you have a variable with an initial assignment, ‘auto’ will just make it the type of that assignment value, as in the comments.