So I was looking at some c++ source code and wanted to know just what the heck this meant. I think it means call tmp as a function but I’m not sure.
char* tmp;
///stuff filling tmp with values
((void (*)())tmp)();
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.
Yes, it’s casting
tmpas pointer to a function that accepts no arguments and returns nothing, then calling it.Looks like a recipe for disaster, if you ask me.