Advertisement

Lets make a c++ program!

Started by January 29, 2011 12:27 AM
62 comments, last by sprite_hound 13 years, 9 months ago
I had an idea to create a program from forum posts! This will probably not make anything cool but it's worth a try.

Rules are as follows:

1. One line of code per post with no more than one semicolon or one curly bracket and no trigraphs or digraphs.<br /> Anything after one curly bracket counts as a new line.<br /> <br /> 2. Your line of code must function with all previous posts.<br /> <br /> 3. Your line of code must be in code tags.<br /> <br /> 4. You can submit a revision to a line by first writing &quot;Revision:&quot; then quoting the line you would like to replace followed by your line in code tags.<br /> Your revision will only be accepted if deemed necessary by OP.<br /> <br /> 5. You can insert a line by first writing &quot;Insert:&quot; then quoting the line you would like to insert after followed by your line in code tags.<br /> <br /> 6. All code and posts that do not follow the above rules will be ignored.
I'll start:#include <windows.h>
Advertisement
I believe this meets all requirements...


int main() { return 0; }


int main() { return 0; }



Violates rule #1 since there are two curly brackets.

int main() { return 0;


Grandfathered, and still correct.

In time the project grows, the ignorance of its devs it shows, with many a convoluted function, it plunges into deep compunction, the price of failure is high, Washu's mirth is nigh.



int main() { return 0;




Nope still violates rule #1 tongue.gif
Advertisement

'Washu' said:


int main() { return 0;




Nope still violates rule #1 tongue.gif

Wrong. You changed the rules, however as the implementation was in place before the rules changed it is therefore still correct.

In time the project grows, the ignorance of its devs it shows, with many a convoluted function, it plunges into deep compunction, the price of failure is high, Washu's mirth is nigh.


'SteveDeFacto' said:

'Washu' said:


int main() { return 0;




Nope still violates rule #1 tongue.gif

Wrong. You changed the rules, however as the implementation was in place before the rules changed it is therefore still correct.


Fine then I propose a revision! cool.gif

#include <stdio.h>

'Washu' said:

'SteveDeFacto' said:

'Washu' said:


int main() { return 0;




Nope still violates rule #1 tongue.gif

Wrong. You changed the rules, however as the implementation was in place before the rules changed it is therefore still correct.


Fine then I propose a revision! cool.gif

#include <stdio.h>


int main() ??< return 0; ??>

In time the project grows, the ignorance of its devs it shows, with many a convoluted function, it plunges into deep compunction, the price of failure is high, Washu's mirth is nigh.

How about this then, it should satisfy the rules.
auto f(int x, int (*y)(double)) -> double {

To make it is hell. To fail is divine.

This topic is closed to new replies.

Advertisement