So how should I start a program....
Is it
void main,
or void main(void)??
Printable View
So how should I start a program....
Is it
void main,
or void main(void)??
This has some parsing information I needed once.
http://www.cprogramming.com/cboard/s...hlight=parsing
- Sean
:p
-Prelude
int main(int argc,char *argv[])
{return 0;
}
int main(void)
{return 0;
}
void main(int argc,char *argv[])
{
}
void main(void)
{
}
as you please! depending of what u wanna do:
It's void main() btw. And in anticipation of the next question, here's how you do it:
-PreludeCode:main(void){int(c)=6,_c=1,c_=32;o:c>0?printf("%*c%0*c\n",c--,c_,_c,'0'):exit(0),_c+=2;goto o;}
And what, pray tell, does that exactly do, fairest Prelude?
Nice triange man! neat code too. Figure that one out later....! When my brain is awake more :DQuote:
Originally posted by Prelude
It's void main() btw. And in anticipation of the next question, here's how you do it:
-PreludeCode:main(void){int(c)=6,_c=1,c_=32;o:c>0?printf("%*c%0*c\n",c--,c_,_c,'0'):exit(0),_c+=2;goto o;}
....at least somebody understood. Go on, did you realise before or after you looked at it???Quote:
Originally posted by Prelude
:p
-Prelude
Unregistered.:D :D
BTW, nice photo!!!
http://www.geocities.com/Area51/Cave...st/walker.html
>did you realise before or after
Before since it used my exact wording from the GD board. ;)
>Nice triange man! neat code too. Figure that one out later....!
You should see the code I use to answer that question on IRC. Obfuscation like that can cause your brain to explode. :D
-Prelude
I stake no claim to coding this one... only adapting it, and even that burnt a good few brain cells ;-)Code:sh(int it){if (it>1 && printf("%s",it-70?it&1?"*":" ":(it=0,"\n"))) sh(it>>1);}
main(int it){char *b="b~bb~~ ~b~~~FbbvvBb<HbHBBF~~jj~~ H~H~~FbbbbBJ<HbHBBFbbbb~R Hb~~B";
while(it=*b++) sh(it);
}
Not bad. Recursion is fun. :)
-PreludeCode:x=6,_x=7,x_=7;main_(x,_x)
{return(x>0?x_--,main_(x-
printf("%c",_x),_x):x_);}
main(){x>0?main_(main_(x,
32),42),x_+=_x+=1,printf
("%c",'\n'),--x,main():0;}
HELP!! I CANNOT BELIEVE WHAT I AM SEEING
NO void main.Code:#include <myheaderfile.h>
#define IF_I_NEED_CONSTANTS 1
int main(int argc, char* argv[]) // GOOD!! no void here please
{
//CODE HERE
return 0; //return with no errors, or set it to return 1; to return with errors
}
void main is ANSI Incorrect
and ANSI is currently in charge of ANSI C
-Luke
One of the ones I liked best from the Obfucated C contests was a maze genrator who's source code was itself a maze.
Quzah.
Had some code here, decided that it was just a waste of time.
Anyway there was some code for this code on pi
REALLY REALLY UGLY LOOKING!
Obfuscate C all the way!
Do you write any of these yourself? If so, please stop it; my head hurts :D;) :confused:Quote:
Originally posted by Prelude
Not bad. Recursion is fun. :)
-PreludeCode:x=6,_x=7,x_=7;main_(x,_x)
{return(x>0?x_--,main_(x-
printf("%c",_x),_x):x_);}
main(){x>0?main_(main_(x,
32),42),x_+=_x+=1,printf
("%c",'\n'),--x,main():0;}