main actually isnt where it starts. its just the entry point that can be changed. the win api does it. point is you can actually have a program without int main(). but that code shouldnt compile, at least not with gcc, because your not providing any entry point at all
oh my bad i didnt see chars were passed to hack. i thought those were variables to pass. so while what i said is true, this will compile because despite what op says, it does have a main(), just hidden by a macro
point is you can actually have a program without int main(). but that code shouldnt compile, at least not with gcc, because your not providing any entry point at all
Any compiler will compile that code, even without any main(). It is the linker which will complain about some "undefined reference".
PS - It is possible to write a C program which does not use any CRT functions and does not depend on it, with no main() at all.
Any compiler will compile that code, even without any main(). It is the linker which will complain about some "undefined reference"
maybe with your compiler. it doesnt for my compiler. it generates a bunch of errors before the linker starts.
edit:
PS - It is possible to write a C program which does not use any CRT functions and does not depend on it, with no main() at all.
and once again idk what compiler your using, but mine certainly doesnt let you. and dont quote me on this, but i had an argument with someone a long time ago and i think they said it was against the standard