fellow noobs read this!!

Pages: 12
+1.

I was so fired up when I first figured out how to use structs and classes. Like 4 days ago maybe? (Thank you hanst99) It opens the door to the other 95% of programming.

Wait until you get into classes and data parsing from an .ini or txt file. And functions within structures.... within structures, within structures!

OOD. Crazy stuff. It's like, you try to figure out the best way to do something and you think you're on the right track... until you read something better and it just makes sense to you... it's basically like a EUREKA!!!!! moment.

I'm just so fired up that I want to write an arbitrary structure for the hell of it!!!

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
struct elements
{
int hydrogen;
int oxygen;
int nitrogen
int carbon
int copper
int zinc
int iron;
LIQUID liq;
SOLID sol;
GAS gas;
}

struct LIQUID
{
int water;
int hydrocarbon;
}

struct SOLID
{
int brass;
int steel;
}

struct GAS
{
int carbon_monoxide;
int carbon_dioxide;
int nitrous_oxide;
}
would that one above this post even work? you declared liq, sol, and gas before you declared their types.
It won't compile as it is.
Simply put a
1
2
3
struct LIQUID;
struct SOLID;
struct GAS;


before the elements struct... it'll compile then, probably won't be super useful though =)
closed account (zb0S216C)
Lines 13, 19, 25 and 32 don't look complete.
ops, looks like they're not;
First message is great :)
I can see the excitement he had.
Topic archived. No new replies allowed.
Pages: 12