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

C++ Exception Class

Name: Anonymous 2009-10-12 17:38

I have to write/fix this class for an exception in a tic tac toe prompt game, it has to throw an error whenever 0>x>8

Any of you brilliant motherfuckers want to help?

#ifndef illegalmoveexception
#define illegalmoveexception

#include <stdexcept>
#include <string>

using namespace std;
class illegalmoveexception : public illegal_move_exception
{
public:
    illegalmoveexception();
    : illegal_move_exception("invalid move")
   
};

Name: Anonymous 2009-10-12 17:42

Here are paste bin links to what I have to edit

board.h http://pastebin.ca/1616561
board.cpp http://pastebin.ca/1616562
and
player.cpp http://pastebin.ca/1616566
respectively

Name: Anonymous 2009-10-12 18:44

To be honest OP, you won't find much help here. I program C, so I can't. Try 7chan's /pr/

Name: Anonymous 2009-10-12 18:52

>>1
Why do you want to throw an exception instead of returning a boolean?

Name: Anonymous 2009-10-12 18:56

>>4
Required by the course, trivial and redundant C++ comp sci class for the win

Name: Anonymous 2009-10-12 19:05

>>5
trivial
>>1
help

IHBT

Name: Anonymous 2009-10-12 19:16

in b4 [spoilers]/prog/[/spoiler] is not here to DO YOUR FUCKING HOMEWORK FOR YOU

Name: Anonymous 2009-10-12 19:17

>>1
So what's the problem? put the loop in a try..catch and have the isValid function throw the exception if x isn't in the range 0-8.
HIBMT?

Name: Anonymous 2009-10-12 20:55

>>-
DON'T HELP HIM!!!

Name: Anonymous 2009-10-12 21:03

Yeah, you not being able to do something as fucking simple as this should be a giant sign that you should consider a future working as a dish washer.

Name: Anonymous 2009-10-13 10:37

>>10
You can probably go eat a dick, some of us like to do more than read C++ manuals all day, I for one like to talk to other people and go outside.  Im a CIS major not a CS major big difference but I still have to program.  I need to learn the theories only but I have to still do the work.

Name: Anonymous 2009-10-13 10:46

>>11
Then go do the work! I, on the other hand, will continue to eat copious amount of dick.

Name: Anonymous 2009-10-13 10:52

>>11
I need to learn the theories only
If you can't understand how to fucking use exceptions in their most basic form, I doubt you can cope with any level of CS theory

Name: Anonymous 2009-10-13 10:53

>>11

If you can't do the work, you don't properly understand the theory.

Name: Anonymous 2009-10-13 11:10

>>11
God, I'd like you see you learn continuations if you can't even get exceptions.

Name: Anonymous 2009-10-13 11:40

Continuations aren't that hard to grasp.

They're just "remember what you're doing" and "keep doing it".

Name: Anonymous 2009-10-13 11:41

Continuations are a poor man's goto.

Name: Anonymous 2009-10-13 11:43

>>17
Continuations are a poor man's ON ERROR RESUME NEXT.

Name: Anonymous 2009-10-13 12:37

OP, post player.h, in fact, your whole source, please.

Name: Anonymous 2009-10-13 13:25

Just because he doesn't already know shit doesn't mean he can't learn & figure it out.  Calm down you retards.

Name: TRUE TRUTH EXPERT !!TthtFzrtPXElUy7 2009-10-13 14:12

>>20
fUCK YOU i WAS BORN KNOWING!

Name: Anonymous 2009-10-13 23:18

>>20
Thanks, I figured it out.

>>14
SO does that mean quantum mechanics are all liars just because they can't finish the work, or that string theorists are wrong?  Does that mean people who believe in religion are wrong, or that atheists are wrong because they have an idea they just can't implement it to come up with a solution.  Your logic is flawed sir.

Name: Anonymous 2009-10-13 23:28

>>1-
Stop bumping shit threads

>>22
You are an imbecile, In the first two cases they are working with incomplete theories in a still exploratory area of science, whereas you are dealing with something both simple and well understood. Religious people are wrong, because they choose to believe in fairy stories over providing any level of plausibility or falsifiability. And finally, what idea do atheist have that they can't implement a solution for? It seems to me the only thing that characterises Atheism is a lack of belief in a deity.

Name: >>10 2009-10-13 23:56

>>23
Atheism is the belief in no god(s), which also can't be proven.  Agnosticism is understanding that neither side can prove their claim without supernatural forces intervening.

Name: Anonymous 2009-10-14 0:05

>>24
It's like I'm arguing with that Jehovahs witness all over again *sigh*

Name: Anonymous 2009-10-14 0:14

>>24
Belief in no gods = no belief in any gods.

Name: Anonymous 2009-10-14 0:21

Religion - There is a cat in that box.
Atheism - There is no cat in that box.
Agnosticism - I don't know what's in that box.

Name: Anonymous 2009-10-14 0:31

>>27
I might add to your post the following:
Theism is the belief in a supernatural god(s).
Atheism is the lack of belief.
Gnosticism is the belief that we can determine whether or not supernatural forces exists, we just haven't done it yet.
Agnosticism is the belief that we cannot know - not now or ever - whether or not supernatural forces exist. The very question is outside the realm of quantifiable knowledge.

It is possible to be a Gnostic Atheist and an Agnostic Theist, although these two classes are quite rare.

Name: Anonymous 2009-10-14 0:36

>>27
Quantum mechanics - there is a cat in that box which as a superposition of both existing and non-existing

Name: Anonymous 2009-10-14 1:15

>>27
Religion — For no reason at all, I believe there is a cat in that box.
Athiesm — Since I have no proof, I do not believe there is a cat in that box.
Agnosticism — Lol u guize. I don't believe there's a cat in that box, but I don't want to say so.

Name: Anonymous 2009-10-14 1:24

>>30
This isn't right at all. See >>28. Gnosticism and theism are not mutually exclusive

Name: Anonymous 2009-10-14 1:34

Religion and atheism are both the same: THEY DESTROY /prog/!

Name: Anonymous 2009-10-14 2:03

>>30
Agnosticism — Lol u guize. I don't believe there's a cat in that box, but I don't want to say so.
Agnosticism - I have no idea if there's a cat, or anything in the box, nor do I give a fuck about it, so I'm not going to make assertions which cannot be proven.

Name: Anonymous 2009-10-14 2:24

Agnosticism - Atheist lite

Name: Anonymous 2009-10-14 2:27

>>33
That's what I said. No belief, but agnostics won't admit it.

Name: Anonymous 2009-10-14 2:32

>>28-31,35

Back to /b/, please!

Name: Anonymous 2009-10-14 2:38

>>36
I'd like to hold this post up as an example of Optimised Quoting, that we can all learn from.

Name: Anonymous 2009-10-14 4:18

>>35
Except gnosticism is not about belief in a supernatural force. It is about verifiability; whether we can or cannot know about the existance of supernatural forces. It is possible to believe in a god but also be Agnostic.

Name: Anonymous 2009-10-14 4:24

>>33
actually, it's more like:
I believe that there is some type of cat, however I don't believe in that we'll ever know whether or not there really is a cat, nor will we ever know the type of cat inside.

Name: Anonymous 2009-10-14 4:29

JUST OPEN THE DAMNED BOX ALREADY!!!!

Name: Anonymous 2009-10-14 4:36

>>39
that's an agnostic theist

Name: Anonymous 2009-10-14 4:50

#define illegalmoveexception
class illegalmoveexception


lol

Name: Anonymous 2009-10-14 4:56

HOLY SHIT.  USE SAGE IF YOUR GOING TO BE IDIOTS!

Name: sage 2009-10-14 5:12

sage goes in all fields

Name: Anonymous 2009-10-14 8:56

Use sage, you 16 year old lal guise ive dust discavered debating and religion am i inteligent now? bull feces.

If you want to debate, go elsewhere. Act professional (Not ENTERPRISE, though).

THIS IS THE PROGRAMMING BOARD.

Name: Anonymous 2009-10-14 20:43

>>45
Butthurt atheist fag

Name: Anonymous 2009-10-14 20:50

THIS IS THE PROGRAMMING BOARD.
lol newfag

>>46
Please don't bump shit threads

Name: Lain 2009-10-15 4:05

Lain.

Name: Anonymous 2009-10-15 5:38

My eyes are bleeding now.

Name: Anonymous 2009-10-16 8:50

>>46
>>45 here, I'm actually Christian, but I keep to the topic
IHBT

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