So how should I start a program....
Is it
void main,
or void main(void)??
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
If cities were built like software is built, the first woodpecker to come along would level civilization.
Black Frog Studios
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:
Ünicode¬>world = 10.0£
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;}
My best code is written with the delete key.
And what, pray tell, does that exactly do, fairest Prelude?
Code:#include <cmath> #include <complex> bool euler_flip(bool value) { return std::pow ( std::complex<float>(std::exp(1.0)), std::complex<float>(0, 1) * std::complex<float>(std::atan(1.0) *(1 << (value + 2))) ).real() < 0; }
Nice triange man! neat code too. Figure that one out later....! When my brain is awake moreOriginally 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;}
When all else fails, read the instructions.
If you're posting code, use code tags: [code] /* insert code here */ [/code]
....at least somebody understood. Go on, did you realise before or after you looked at it???Originally posted by Prelude
-Prelude
Unregistered.
BTW, nice photo!!!
http://www.geocities.com/Area51/Cave...st/walker.html
Last edited by RobR; 04-29-2002 at 02:40 PM.
Visit entropysink.com - It's what your PC is made for!
>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.
-Prelude
My best code is written with the delete key.
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); }
When all else fails, read the instructions.
If you're posting code, use code tags: [code] /* insert code here */ [/code]
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;}
My best code is written with the delete key.
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
Last edited by Lynux-Penguin; 04-29-2002 at 05:43 PM.
Asking the right question is sometimes more important than knowing the answer.
Please read the FAQ
C Reference Card (A MUST!)
Pointers and Memory
The Essentials
CString lib
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.
Hope is the first step on the road to disappointment.
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!
Last edited by Lynux-Penguin; 04-29-2002 at 06:06 PM.
Asking the right question is sometimes more important than knowing the answer.
Please read the FAQ
C Reference Card (A MUST!)
Pointers and Memory
The Essentials
CString lib
Do you write any of these yourself? If so, please stop it; my head hurtsOriginally 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;}
When all else fails, read the instructions.
If you're posting code, use code tags: [code] /* insert code here */ [/code]