Reputation: 679
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)();
Upvotes: 3
Views: 172
Reputation: 62063
Yes, it's casting tmp
as pointer to a function that accepts no arguments and returns nothing, then calling it.
Looks like a recipe for disaster, if you ask me.
Upvotes: 7