don't leave.


September 30, 2005

Does this look like Art?

I don't know... apparently this might make me a better artist:

#pragma once

#include
#include
#include

const int STACK_SIZE = 100;

class Stack
{
public:
void init(); //initializes stack
void push(const int item); //pushes into stack
int pop(); //pops from stack

private:
int count;
int data[STACK_SIZE]
};

Posted by jeremie at September 30, 2005 5:20 PM
Comments

Dude, I don't know about art, but that won't even *compile*.

I'll be sure to post some of my life drawings real soon. You know, so we can compare notes.

Posted by: a different brett at September 30, 2005 8:11 PM

hah... it would if the blog didn't take out half of the words because it thought they were html. I don't know what the hell i am doing anyway. It makes me want to fingerpaint on a street corner for quarters

Posted by: jeremie at September 30, 2005 10:14 PM

Oh, of course. You need to change those less thans and greater thans to < and >. I don't know what you'd be including anyway, your file doesn't use anything from stdlib, stdio, or anything else for that matter, so those should go in your cpp file :)

Eventually, of course, you'll want to write a templated version of the class and dynamically allocate your stack's memory. Then, after *that*, you'll want to just switch to std::stack, which does all of that anyway.

Programming. Bah.

Posted by: a different brett at October 1, 2005 6:10 AM

Oh, I guess you'll have to look at my comment source for the lts and gts.

Posted by: a different brett at October 1, 2005 6:10 AM

don't you talk to me like that! i will post here later today. right now i need to go get a cup of joe.

Posted by: brett at October 1, 2005 9:38 AM

The stacked part I get.
umm that can be artsy?

Posted by: rob at October 1, 2005 3:41 PM

yeah rob... now you have to post some fortran for us

Posted by: loren at October 1, 2005 10:05 PM

f*ckin geeks. talk to me in a language i understand. has anyone seen the new In Style? it details some GREAT fall hair styles... not to mention the fool proof "instant beauty" ideas. now that's genius.

Posted by: Missy at October 3, 2005 2:14 PM

Fortran!! I love do loops.. nobody can do a do loop like I do do loops.

Posted by: rob at October 4, 2005 8:25 PM
Post a comment









Remember personal info?