Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

class examples

Name: Anonymous 2011-12-19 2:28

so I was thinking of making a class "Meal" that would contain the properties of the food required to make the instance of a meal to be made. I'v hit a stump however and am not sure how i would include the ingredients into the class

If I define say, 3 strings to be ingredient 1, 2, and 3 know I'm going to find a meal that has more then 3 or less then 3 ingredients to make.

Is there a more efficient way to define my class properties as food ingredients, or am I missing something?

also: just finished first semester so yeah I am quite sure this is a no brainer for some, just not me.

Name: Anonymous 2011-12-19 2:37


class Meal{
   public:
   Ingredient Ingredients;
};

class Ingredient{
   public:
   Ingredient(){
      Hump.Camels();
   }
   Ingredient* Next;
};

Name: Anonymous 2011-12-19 2:47

:O dur ty i got it

Name: Anonymous 2011-12-19 3:51

>>2
U MENA new LinkedList<Ingredient>()

Name: Anonymous 2011-12-19 4:34

I fucking hate templates. Eat my dick.

Name: Anonymous 2011-12-19 4:38

>>5

Then just use LinkedList<Object> and pretend it not template!

Name: >>6 2011-12-19 5:20

U MENA std::list<void*>

Name: >>4 2011-12-19 5:35

>>7
I MENA JAVA

Name: Anonymous 2011-12-19 5:37

ooc.util.ArrayList

Name: Anonymous 2011-12-19 6:39

>>6
That's right. Why have the JVM generate the bytecode for one type when you can have the fucking thing generate the bytecode for every fucking type!

Name: Anonymous 2011-12-19 9:16

check 'em

Name: Anonymous 2011-12-19 9:40

dynHAMic alLOCATION
+
ingredinecetne coungert*counter

Don't change these.
Name: Email:
Entire Thread Thread List