Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
所以我在看一些 c++ 源代码,想知道这到底是什么意思。我认为这意味着将 tmp 作为函数调用,但我不确定。
char* tmp; ///stuff filling tmp with values ((void (*)())tmp)();
是的,它转换tmp为指向不接受任何参数且不返回任何内容的函数的指针,然后调用它。
tmp
如果你问我,这看起来像是灾难的秘诀。