the backwards thread

Pages: 123
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
closed account (S6k9GNh0)
Oh mah gerd, how did it get this derailed??
@ 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
closed account (Dy7SLyTq)
One time I made a cup out of bacon
@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...
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...
@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?
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
closed account (S6k9GNh0)
This thread is strangely affixed to bacon...
If there's any truth to what Aristotle postulates, then bacon may just be the natural resting place of humankind.

-Albatross
Apparently, according to cannibals, humans taste like bacon.
@ Script Coder: This is why the dish is called "Long Pig".
@Script Coder, Computergeek01
I'm worried about how you two came upon that information.
Are we still going backwards?
This thread is a natural language example of spaghetti code.
Apparently a butterfly used to be known as a flutter by, due to the fact that they used to do just that.
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
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.
closed account (Dy7SLyTq)
damn devon his choice of libraries makes no difference here
@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