the backwards thread

Pages: 123
Nov 4, 2013 at 5:48pm
closed account (Dy7SLyTq)
so i dont think we have had a forum game in a while, so i say we try this one out (i came up with this the other day) we start out with what would be the last post in the thread and then keep working backwards until someone inevitably posts what would be the question of the op. ill start:

I would much rather use a stack than a double ended queue
Nov 4, 2013 at 5:51pm
closed account (S6k9GNh0)
Oh mah gerd, how did it get this derailed??
Nov 4, 2013 at 5:52pm
@ DTSCode: No one here thinks less of you for what you do on your spare time. It's a little strange and I don't know what you actually use the bacon for but can we please get back to the OP's topic?

Something like this?

EDIT: I see computerquip gets it! :D
Last edited on Nov 4, 2013 at 5:53pm
Nov 4, 2013 at 5:56pm
closed account (Dy7SLyTq)
One time I made a cup out of bacon
Nov 4, 2013 at 6:05pm
@OP - Your function GenerateStart() is returning void when it should be returning bool.

I bet L B will come into this thread any minute to complain about something OT...
Nov 4, 2013 at 6:16pm
I wonder if anyone is actually going to answer the OP's question? I'd have a go but I refuse to read unindented code. I do see you implementing your own dynamic arrays, though, which is generally not a good idea. You should use something like std::vector or std::deque instead.

On a different note, I wish it were possible to make kitchenware out of meat...
Nov 4, 2013 at 6:30pm
@OP first off: PLEASE USE CODE TAGS
http://www.cplusplus.com/forum/lounge/115664/
secondly: Why are you not freeing your memory when you are done with it?

also, who reported me?
Nov 4, 2013 at 6:49pm
hi im doing this program for high school. it doesn't work. please help

#include <iostream>
#include <new>

using namespace std;

void GenerateStart() {
cout << "welcome to the bacon shop! do you want to buy some baconware?"
bool b;
cin >> b;
return b; }

int* MakeArray (int oldsiz, int newsiz, int* lastarray) {
int* newarray = new int[newsiz];
for(int i = 0; i < oldsiz && i < newsiz; ++i)
newarray[i] = lastarray[i];
return newarray;}

int main() {
if(GenerateStart()) {
int* quantities = new int[1];
int siz = 1;
while(true) {
int temp = 0;
cout << "1. bacon dinner plate" << endl;
cout << "2. bacon fork" << endl;
cout << "3. bacon knife" << endl;
cout << "4. bacon spoon" << endl;
cout << "5. bacon spatula" << endl;
cout << "6. bacon ladle" << endl;
cout << "7. bacon napkin" << endl;
cout << "8. bacon tablecloth" << endl;
cout << "9. bacon roast pig" << endl;
cin >> temp;
quantities[siz-1] = temp;
cout << "thank you do you want to buy more?";
bool dostop;
cin >> dostop;
if(dostop)
break;
quantities = MakeArray(siz,siz+1,quantities);
return 0;}}}

-albie

[/thread]

EDIT: Forgot something rather important in the faux code. Oops.
Last edited on Nov 4, 2013 at 6:52pm
Nov 4, 2013 at 6:53pm
closed account (S6k9GNh0)
This thread is strangely affixed to bacon...
Nov 4, 2013 at 6:55pm
If there's any truth to what Aristotle postulates, then bacon may just be the natural resting place of humankind.

-Albatross
Nov 4, 2013 at 7:01pm
Apparently, according to cannibals, humans taste like bacon.
Nov 4, 2013 at 7:02pm
@ Script Coder: This is why the dish is called "Long Pig".
Nov 4, 2013 at 7:05pm
@Script Coder, Computergeek01
I'm worried about how you two came upon that information.
Nov 4, 2013 at 7:15pm
Are we still going backwards?
Nov 4, 2013 at 7:22pm
This thread is a natural language example of spaghetti code.
Nov 4, 2013 at 7:37pm
Apparently a butterfly used to be known as a flutter by, due to the fact that they used to do just that.
Nov 4, 2013 at 9:08pm
I think everything in life can be a example of spaghetti code if the circumstances are right. Bacon? I'm partial to home made chicken alfredo (egg noodles, boneless chicken, alfredo sauce). All this talk about food is making me hungry.

I'm glad to see everyone is able to joke around and isn't so serious, but how do you get reported in a thread that is started to be a joke to begin with? o.O
Nov 4, 2013 at 10:15pm
look Im sorry, I didn't want to offend any of you from now on I will make a special effort not to say things like that and to help people with their coding projects for school.
Nov 4, 2013 at 10:32pm
closed account (Dy7SLyTq)
damn devon his choice of libraries makes no difference here
Nov 4, 2013 at 11:19pm
@OP
That ic C not C++

And please try another compiler as Turbo C died decades ago

*my hamburger goes - meat, cheese, meat and cheese*
Pages: 123