Hello, I have an error in a program I wrote, and I can't figure out what I did wrong. Could someone please take a look at it for me? It would be much appreciated.
The code was too many lines to post here, so please read it:
>>2-3,5-6
Jesus, when did /prog/riders get this dumb?
Good job, you've managed to ruin one of the funniest things I've read all year. I'm ashamed I even tried to amuse you faggots.
If you spent three seconds looking at the thread I linked, you'd be clutching your sides in laughter right now. Instead, you went "OH BOY A THREAD ASKING FOR ADVICE BETTER TELL HIM TO FUCK OFF DO I FIT IN YET? LEL HAVE YOU READ YOU'RE SICP TODAY THAT IS SO FUNNY MY OTHER CAR IS A CDR CAN'T STOP LAUGH" like you all just discovered this board yesterday.
Have none of you ever seen the "OP pretends to be the poster of the article he is linking" format for a thread? Seriously? I thought I could write something ever so slightly more clever than ``Lol guys check out this idiot he can't code WTF am I reading lol'' but apparently, the average /prog/rider these days is too dense to get even that kind of ``joke'' without having it completely spelled out for them.
Get the fuck out of /prog/ and never come back, all of you.
Name:
Anonymous2012-11-21 21:56
oh my god this is horrendous
then I realized IHBT
Name:
Anonymous2012-11-21 22:09
>>2-3,5-6
Monkeys.
I haven't read the thread in OP's post, but I have laughed at you.
The sad part is how much time this most likely took you to write 4,000 lines of bullshit. That said, posting it "for the lulz" on a legitimate programming website asking for assistance is an asshole move.
tl;dr OP = faggot
Name:
Anonymous2012-11-21 22:24
this nigga never heard the old saying:
two or more, use a for!
int x;
int xx;
int xxx;
int xxxx;
int xxxxx;
int xxxxxx;
int xxxxxxx;
This kind of logic is typical of COBOL programmers. Except in COBOL you don't get the luxury of a compiler with halfway decent error messages. Everything is global and anything can modify anything else.
I've seen much scarier code. This should be easy to fix.
And I could probably do it in 4 with Ruby, but it would look VERY ugly, and everything would be a giant mess of message passing and blocks. Also, every line would be over a thousand characters long.
He dedicated one of the features of his program to reading two lines of text, discarding the first, and printing the second with a stupid margin outline effect. Either he's a mad genius or (judging by the path to the file mentioned in the original thread) an employee at a company I want nothing to do with, ever.
Or he's just trying desperately to learn C++, and keeping all his shit in the same file for some reason.
Name:
Anonymous2012-11-22 10:32
>>7
Should have titled it EXPERT C++ PROGRAMMER [4000 LINES OF PUSSY AND ASS]
>>32
You should just dump it and start again. Next time, consider splitting up your program into different files, where each file contains code with related functionality. Also, compiler error messages are incredibly helpful - they tell you exactly what went wrong where.
>>32
Go back to your C++ text book and review the flow control operators (for, while, etc). Think about the logical steps of work in your program (for example, one step might be: printing a prompt message, reading a value from cin, and storing the value in a variable). Then break those steps into separate functions and invoke them each time they're needed. This will reduce the amount of redundant code in your file. HTH :)
Name:
Anonymous2012-11-24 21:12
>>23 Java style braces
Back to /code/g/[/code], bitch.