Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   C without main()!!! (http://www.go4expert.com/forums/c-without-main-t989/)

Tango Issac Debian 8Jul2006 23:51

C without main()!!!
 
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 10Jul2006 11:04

Re: C without main()!!!
 
I could not compile that in VC 6. It gave an error regarding unresolved external symbol _main.

Aztec 10Jul2006 17:21

Re: C without main()!!!
 
@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.


All times are GMT +5.5. The time now is 12:22.