程序没有main()?

her*_*tao 1 c c++ program-entry-point

在这里看到这个有趣的问题,询问没有的程序的可能性main().在那里,我看到eon给出了如下一个答案,这在C/C++中很有效.

#include<stdio.h>
#define decode(s,t,u,m,p,e,d) m##s##u##t
#define begin decode(a,n,i,m,a,t,e)

int begin()
{
  printf(" hello ");
}
Run Code Online (Sandbox Code Playgroud)

有人可以解释上面的代码如何工作?是不是真的在main()这里或只是隐藏在我们的眼睛里?

Die*_*ühl 10

仔细看看宏:它只是main从字符拼接在一起animate并取代它们begin().