C without main()!!!

Tango Issac Debian's Avatar, Join Date: May 2006
Go4Expert Member
Some days ago, I have started to think about " Is it possible to construct a C programmre without a main() func?"

Then think ing about it during somedays i have find out its solutions as
Code: CPP
#include <stdio.h>
#define decode(t,h,n,k,y,o,u) m##s##u##t
#define begin decode(a,n,i,m,a,t,e)
begin()
{
    printf("Hallo everyone,It is the Programme without main() function!!!");
    return 0;
}
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
I could not compile that in VC 6. It gave an error regarding unresolved external symbol _main.
Aztec's Avatar, Join Date: May 2006
Contributor
@Tango

Your code still has main. Anyways, if you still want to use macro then why not do simply this
Code:
#define begin main
@Shabbir

VC6 sucks. Use a better compiler.