The Azure Heights Forum


Post New Topic  New Poll  Post A Reply
my profile | search | faq | forum home
  next oldest topic   next newest topic
» The Azure Heights Forum   » The Courtyard   » Karp Park   » Fuck you, compiler.

UBBFriend: Email this page to someone!    
Author Topic: Fuck you, compiler.
cfalcon
OLDNBLD
Member # 19

Member Rated:
posted 08-10-2003 12:46 PM      Profile for cfalcon   Email cfalcon   Send New Private Message      Edit/Delete Post  Reply With Quote 
God damn piece of shit compiler.

Ok, can someone tell me how, in C++, to create the following classes?

class A
{
B *bpoint;
int payload;
};

class B
{
A *apoint;
char payload;
};

This means I want "A" to consist of a pointer to B and an integer, and "B" to consist of a pointer to A and a character.

What happns when I do this is it complains because it doesn't know what a "B" is when it gets to the part about a B pointer- because class B hasn't been declared yet.

But obviously switching them won't solve it.

Sucksucksucksucksucksucksucksucksucksucksucks!

Am I missing something obvious? If you are in school of CS or something, and know the answer to this trivial problem, pls post it.

Unless you are 10k, because then you aren't reading this.

From: 39°45' N, 104°52' W | Registered: Feb 2000  |  IP: Logged
cfalcon
OLDNBLD
Member # 19

Member Rated:
posted 08-10-2003 12:47 PM      Profile for cfalcon   Email cfalcon   Send New Private Message      Edit/Delete Post  Reply With Quote 
If the answer involves

template <class T>

I will cry a little.

From: 39°45' N, 104°52' W | Registered: Feb 2000  |  IP: Logged
The Muffin King
Farting Nudist
Member # 2240

Member Rated:
posted 08-10-2003 01:53 PM      Profile for The Muffin King   Author's Homepage     Send New Private Message      Edit/Delete Post  Reply With Quote 
The answer involves template <class T>
From: Maryland | Registered: Sep 2001  |  IP: Logged
Fluorine
SMELLY BUTT
Member # 2904

Member Rated:
posted 08-10-2003 02:24 PM      Profile for Fluorine     Send New Private Message      Edit/Delete Post  Reply With Quote 
Try that:

class B;

class A
{
B *bpoint;
int payload;
};

class B
{
A *apoint;
char payload;
};

Registered: Jun 2002  |  IP: Logged
Rysto
Farting Nudist
Member # 24

Member Rated:
posted 08-10-2003 02:31 PM      Profile for Rysto   Email Rysto   Send New Private Message      Edit/Delete Post  Reply With Quote 
You're not going to like this, but at least it won't make you cry a little:

code:
class B;

class A
{
B *bpoint;
int payload;
};

class B
{
A *apoint;
char payload;
};



- - - - -
So "a" can be any value?
-a guy in my Calculus class, on the nature of variables

From: Waterloo, Ontario, Canada | Registered: Feb 2000  |  IP: Logged
cfalcon
OLDNBLD
Member # 19

Member Rated:
posted 08-10-2003 02:34 PM      Profile for cfalcon   Email cfalcon   Send New Private Message      Edit/Delete Post  Reply With Quote 
Yea, that worked.

K mentioned something about declaring them in a bigger thing, maybe he meant above.

Either way, thanks. I guess the first thing just declaring existence is pretty concise, after all.

From: 39°45' N, 104°52' W | Registered: Feb 2000  |  IP: Logged
AnnieKat
Suicidal Failure
Member # 3202

Member Rated:
posted 08-10-2003 02:43 PM      Profile for AnnieKat   Author's Homepage   Email AnnieKat   Send New Private Message      Edit/Delete Post  Reply With Quote 
CS class used to put me in shock. I'd compile the program, and it'd say 5 or 6 errors. I'd be like... YAY! But no, it was too soon. I'd fix one error, and 10 more would appear in its place... I once had 10093 errors in a 300 line program.

It was then that I decided to stay far away from the school of computer science, and do something that doesn't basically require any skills or (for that matter) common sense.

I'm now studying to become a psychiatrist.

- - - - -
aתּņĩềκẢ†~ nθW |’m @ r33| ķıťŧŷ

Anthrax, will you marry me?

From: Anthrax's Love Nest | Registered: Jan 2003  |  IP: Logged
Slade_64
chipmunk pr0n author
Member # 804

Member Rated:
posted 08-10-2003 11:08 PM      Profile for Slade_64   Email Slade_64   Send New Private Message      Edit/Delete Post  Reply With Quote 
quote:
Originally posted by AnnieKat:
...I'm now studying to become a psychiatrist.

He. He he. Ha ha ha. HAAAAAHAAAAAAAAHAAAAAAAAAAAA... LOL... ROTFLMFAO!!!!!!!!eleven!!!!! Ha, ha mmm...........

Ah, I needed that...

- - - - -
Bucket.

From: Funky Town Texas | Registered: Aug 2000  |  IP: Logged
Twinkle
I'm feeling fat and sassy~!
Member # 1690

Member Rated:
posted 08-11-2003 02:46 AM      Profile for Twinkle        Edit/Delete Post  Reply With Quote 
ITT you recommend a shrink?

- - - - -
Hich loch faauto noxlattoyen.

From: Brinstar | Registered: Apr 2001  |  IP: Logged
AnnieKat
Suicidal Failure
Member # 3202

Member Rated:
posted 08-11-2003 10:14 AM      Profile for AnnieKat   Author's Homepage   Email AnnieKat   Send New Private Message      Edit/Delete Post  Reply With Quote 
What's sad is that most of the psychology students I've met aren't any saner than I am...

- - - - -
aתּņĩềκẢ†~ nθW |’m @ r33| ķıťŧŷ

Anthrax, will you marry me?

From: Anthrax's Love Nest | Registered: Jan 2003  |  IP: Logged
Donald
Bob the Builder
Member # 1551

Member Rated:
posted 08-11-2003 10:48 AM      Profile for Donald   Email Donald      Edit/Delete Post  Reply With Quote 
I am suffering from code rage

*hurls his PC out a window*

From: In your girl's panties | Registered: Feb 2001  |  IP: Logged
dAyWaLkEr
Farting Nudist
Member # 3343

Member Rated:
posted 08-11-2003 11:51 AM      Profile for dAyWaLkEr     Send New Private Message      Edit/Delete Post  Reply With Quote 
meh, at least your high schools don't use some shitty language like OOT (sorta like Pascal). i think the canadian government thought us kids were too stupid to grasp C++ or Java and gave us this "approved for school" piece of crap that has missing syntax's in its tutorial and lags when you do realtime events

gogogo canada

- - - - -
absence of evidence isn't evidence of absence

Registered: Apr 2003  |  IP: Logged
Fenix
I live in a public bathroom.
Member # 2371

Member Rated:
posted 08-11-2003 03:43 PM      Profile for Fenix   Author's Homepage   Email Fenix   Send New Private Message      Edit/Delete Post  Reply With Quote 
Our school still teaches Pascal, which I hated. We just got a Java class for this year's curriculum, which required all of our computer labs getting new computers since our 200mhz Gateways ( [Mad] [Mad] [Mad] ) froze up when they tested the compiler on them.

- - - - -
life of lively to live to life of full life thx to shield battery

From: The Homeworld, Aiur | Registered: Nov 2001  |  IP: Logged
Charmeleon42
Date Rapist
Member # 1066

Member Rated:
posted 08-11-2003 06:10 PM      Profile for Charmeleon42   Author's Homepage   Email Charmeleon42   Send New Private Message      Edit/Delete Post  Reply With Quote 
While we're on the subject of programming...

I downloaded Visual Studio 6.0 off Kazaa at Ikuse's house, and was trying to learn how to do stuff with it... more stuff anyway, since I took Intro to C++ my sophomore year.

I found something about a PutPixel() thing, to use which I needed graphics.h. I tried sticking it in there, but it didnt have graphics.h or something... so was the download a bork, is graphics.h some obscure file, or does it come in some version after 6.0? :/

From: Mountain Dew Land | Registered: Oct 2000  |  IP: Logged
Fluorine
SMELLY BUTT
Member # 2904

Member Rated:
posted 08-11-2003 06:23 PM      Profile for Fluorine     Send New Private Message      Edit/Delete Post  Reply With Quote 
#include <graphics.h>
Registered: Jun 2002  |  IP: Logged
Charmeleon42
Date Rapist
Member # 1066

Member Rated:
posted 08-11-2003 11:21 PM      Profile for Charmeleon42   Author's Homepage   Email Charmeleon42   Send New Private Message      Edit/Delete Post  Reply With Quote 
Quoting from myself: I tried sticking it in there,

I obviously tried that.

From: Mountain Dew Land | Registered: Oct 2000  |  IP: Logged
dAyWaLkEr
Farting Nudist
Member # 3343

Member Rated:
posted 08-11-2003 11:37 PM      Profile for dAyWaLkEr     Send New Private Message      Edit/Delete Post  Reply With Quote 
turing is crap, practically anything over 1000 lines can cause unexplained errors and crashes

it even failed to load countless times my friend's YGO dating sim

and just to let you know, the comp's are 500 mhz machines

- - - - -
absence of evidence isn't evidence of absence

Registered: Apr 2003  |  IP: Logged
Rolken
Vulcan
Member # 7

Member Rated:
posted 08-11-2003 11:39 PM      Profile for Rolken   Author's Homepage   Email Rolken   Send New Private Message      Edit/Delete Post  Reply With Quote 
quote:
Originally posted by AnnieKat:
What's sad is that most of the psychology students I've met aren't any saner than I am...

Takes one to know one.
From: Provo, UT | Registered: Feb 2000  |  IP: Logged


All times are ET (US)  
Post New Topic  New Poll  Post A Reply Close Topic    Move Topic    Delete Topic next oldest topic   next newest topic
Printer-friendly view of this topic
Hop To:


Contact Us | Azure Heights Pokémon Laboratory

© 2000-2019, Maximum Penetration Industries.

Karpe Diem


The views and opinions expressed on this page are strictly those of the author(s). The contents and links have not been reviewed or approved by the University of Miami.