C Board  

Go Back   C Board > General Programming Boards > C++ Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 01-18-2008, 11:28 AM   #1
Absent Minded Programmer
 
Join Date: May 2005
Posts: 933
Vector out of range program crash.

Here is the line of code bolded and the function that produces the errors.
Code:
void Player::draw(int hand_index, Deck * deck, int number)
{
	for(int loop = 0; loop < number; loop++)
	{
		/* place card in player's hand */
		m_player_hands[hand_index].m_card_list.push_back(deck->m_cards.back());

		/* hide all dealer cards except for the first one */
		if (m_player_id == 0 && loop != 0)
		{
			m_player_hands[0].m_card_list[loop].flip_card(false);
		}
		/* remove card from deck */
		deck->m_cards.pop_back();
	}
}

Here is the state of all my watch variables during runtime

Code:
-		deck	0x00359ab8 {m_cards=[52]({m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...},{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...},{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...},{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hear 	Deck *
-		m_cards	[52]({m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...},{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...},{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...},{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...},...,...)	std::vector<Card,std::allocator<Card> >
+		[0]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[1]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[2]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[3]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[4]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[5]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[6]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[7]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[8]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[9]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[10]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[11]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[12]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[13]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[14]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[15]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[16]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[17]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[18]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[19]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[20]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[21]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[22]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[23]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[24]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[25]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[26]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[27]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[28]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[29]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[30]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[31]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[32]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[33]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[34]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[35]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[36]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[37]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[38]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[39]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[40]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[41]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[42]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[43]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[44]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[45]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[46]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[47]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[48]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[49]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[50]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[51]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
-		deck->m_cards	[52]({m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...},{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...},{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...},{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...},...,...)	std::vector<Card,std::allocator<Card> >
+		[0]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[1]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[2]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[3]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[4]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[5]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[6]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[7]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[8]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[9]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[10]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[11]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[12]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[13]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[14]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[15]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[16]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[17]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[18]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[19]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[20]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[21]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[22]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[23]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[24]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[25]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[26]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[27]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[28]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[29]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[30]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[31]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[32]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[33]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[34]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[35]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[36]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[37]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[38]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[39]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[40]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[41]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[42]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[43]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[44]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[45]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[46]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[47]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[48]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[49]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[50]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
+		[51]	{m_suit=-858993460 m_value=-858993460 suits_lookup=[4]("Clubs","Diamonds","Hearts","Spades") ...}	Card
		hand_index	0	int
		loop	0	int
		m_player_hands	[0]()	std::vector<Hand,std::allocator<Hand> >
		number	2	int
-		this	0x00359b90 {m_player_id=0 m_cash=100 m_active_hand=0 ...}	Player * const
		m_player_id	0	int
		m_cash	100	int
		m_active_hand	0	int
		m_bets	[0]()	std::vector<int,std::allocator<int> >
		m_player_hands	[0]()	std::vector<Hand,std::allocator<Hand> >
Hopefully that information shows up correctly, anyways, I can't see any variables that should cause me to access an out of range element?
__________________
Sometimes I forget what I am doing when I enter a room, actually, quite often.
Shamino is offline   Reply With Quote
Old 01-18-2008, 11:54 AM   #2
Absent Minded Programmer
 
Join Date: May 2005
Posts: 933
By the way, here is how I create my hands, is this bad?
Code:
void Player::new_hand()
{
	Hand new_hand;
	m_player_hands.push_back(new_hand);
}
Here is where I initialize everything:
Code:
void Play_State::init(Card_Game * game)
{
	if (game->m_betting_toggle == false)
	{
		// init Players
		Player player0(0);
		Player player1(1);
		game->m_players.push_back(player0);
		game->m_players.push_back(player1);
		// init hands
		game->m_players[0].new_hand();
		game->m_players[1].new_hand();

	}
	// init Deck
	game->m_deck = new Deck;
	// shuffle deck
	game->m_deck->shuffle_deck();
	// draw cards for players
	game->m_players[0].draw(0, game->m_deck, 2);
	game->m_players[1].draw(game->m_players[1].m_active_hand, game->m_deck, 2);

}
__________________
Sometimes I forget what I am doing when I enter a room, actually, quite often.
Shamino is offline   Reply With Quote
Old 01-18-2008, 11:59 AM   #3
Unregistered User
 
Join Date: Sep 2005
Location: Antarctica
Posts: 341
are you sure that hand_index is a valid index into the vector? Also, your way of creating a hand is ok as long as you have a copy constructor. I would consider using pointers instead of stack objects though.
__________________
-- Rocky
-- DreamSys Software (http://www.dreamsyssoft.com)
-- Free Tiff 2 PDF Library (http://www.dreamsyssoft.com/tiff-to-pdf-api)
rockytriton is offline   Reply With Quote
Old 01-18-2008, 12:17 PM   #4
Absent Minded Programmer
 
Join Date: May 2005
Posts: 933
No I don't have a copy constructor actually. If you look at the runtime variables you'll see that hand_index is set to 0, and m_player_hands should have 1 hand in it because I called new_hand() for that player.

Do you think it would solve the problem if I created the hand with new and made a pointer vector for it?
__________________
Sometimes I forget what I am doing when I enter a room, actually, quite often.
Shamino is offline   Reply With Quote
Old 01-18-2008, 12:29 PM   #5
and the hat of sweating
 
Join Date: Aug 2007
Location: Toronto, ON
Posts: 3,285
Quote:
Originally Posted by Shamino View Post
Do you think it would solve the problem if I created the hand with new and made a pointer vector for it?
No, I doubt that would make a difference.

Try using:
Code:
m_player_hands.at(hand_index).m_card_list.push_back(deck->m_cards.back());
The vector::at() funtion will throw an out_of_bounds exception if the index doesn't exist. That way you can catch the exception and log a bit of info about what caused it. That should help you debug it.
cpjust is online now   Reply With Quote
Old 01-18-2008, 12:34 PM   #6
Absent Minded Programmer
 
Join Date: May 2005
Posts: 933
"Runtime was terminated in an unusual way"

Thanks ambiguous error number 143534515

Okay, so obviously there is no hand?
__________________
Sometimes I forget what I am doing when I enter a room, actually, quite often.
Shamino is offline   Reply With Quote
Old 01-18-2008, 12:54 PM   #7
Absent Minded Programmer
 
Join Date: May 2005
Posts: 933
Fixed problem:

Code:
void Betting_State::init(Card_Game * game)
{
	// init betting switches
	m_enough_cash = true;
	m_under_minimum_bet = false;
	// init Players
	Player player0(0);
	Player player1(1);
	game->m_players.push_back(player0);
	game->m_players.push_back(player1);	
	// init hands
	game->m_players[0].new_hand();
	game->m_players[1].new_hand();

}
Before I was calling player0 and player1 seperately to create a new hand and not giong through the game engine or even the vector they existed in.

But I just found some more runtime errors, time to do some more debugging, oh sigh.

Note to self: variables that are initialized within function brackets DISAPPEAR unless you push them into a vector!
__________________
Sometimes I forget what I am doing when I enter a room, actually, quite often.

Last edited by Shamino; 01-18-2008 at 01:24 PM.
Shamino is offline   Reply With Quote
Old 01-18-2008, 01:13 PM   #8
Mysterious C++ User
 
Elysia's Avatar
 
Join Date: Oct 2007
Posts: 14,785
Don't sigh, finding errors is exciting
It's fun to find out what the heck is wrong and finding out why it's wrong, but solving it isn't always fun when you have to redo your design.
__________________
Using: Microsoft Windows™ 7 Professional (x64), Microsoft Visual Studio™ 2008 Team System
I dedicated my life to helping others. This is only a small sample of what they said:
"Thanks Elysia. You're a programming master! How the hell do you know every thing?"
Quoted... at least once.
Quote:
Originally Posted by cpjust
If C++ is 2 steps forward from C, then I'd say Java is 1 step forward and 2 steps back.
Elysia is offline   Reply With Quote
Old 01-18-2008, 01:22 PM   #9
Absent Minded Programmer
 
Join Date: May 2005
Posts: 933
Quote:
Originally Posted by Elysia View Post
Don't sigh, finding errors is exciting
It's fun to find out what the heck is wrong and finding out why it's wrong, but solving it isn't always fun when you have to redo your design.
All these errors are a result of me switching from a single hand pointer in a player class to having a hand container in each player class to support multiple hands.

It required me to change alot of my game logic functions, so now they're all breaking haha. Basiaclly anything that used the hand class (almost ALL game logic functions) had to be suited up for multiple hand possibility.

What's a blackjack game if you can't split your hand yknow?
__________________
Sometimes I forget what I am doing when I enter a room, actually, quite often.
Shamino is offline   Reply With Quote
Old 01-18-2008, 02:27 PM   #10
and the hat of sweating
 
Join Date: Aug 2007
Location: Toronto, ON
Posts: 3,285
Quote:
Originally Posted by Elysia View Post
Don't sigh, finding errors is exciting
Well then you'd have LOTS of fun at my company!
cpjust is online now   Reply With Quote
Old 01-18-2008, 05:35 PM   #11
Kernel hacker
 
Join Date: Jul 2007
Location: Farncombe, Surrey, England
Posts: 15,686
Quote:
Originally Posted by Elysia View Post
Don't sigh, finding errors is exciting
Or when you spend 2-3 weeks trying to understand some code that was written by some third party, where every ten calls or so to some function about 15 levels down from your actual code "does the wrong thing", without actually having much clue about the code that the third party provided. I don't have to fix the bugs, I just have to prove that it's in the third party code - which in itself isn't always that easy.

--
Mats
__________________
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
matsp is offline   Reply With Quote
Old 01-18-2008, 05:37 PM   #12
Mysterious C++ User
 
Elysia's Avatar
 
Join Date: Oct 2007
Posts: 14,785
That's an entirely different story, though.
__________________
Using: Microsoft Windows™ 7 Professional (x64), Microsoft Visual Studio™ 2008 Team System
I dedicated my life to helping others. This is only a small sample of what they said:
"Thanks Elysia. You're a programming master! How the hell do you know every thing?"
Quoted... at least once.
Quote:
Originally Posted by cpjust
If C++ is 2 steps forward from C, then I'd say Java is 1 step forward and 2 steps back.
Elysia is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem using structures (they crash my program) shadow1515 C Programming 7 06-17-2008 08:36 AM
sprintf() giving crash to program!! maven C Programming 4 01-01-2006 12:26 PM
Filling a 2d Array cause program to crash Geo-Fry C++ Programming 2 05-22-2003 07:00 AM
Trying to make rand different per program run Dreamerv3 C++ Programming 6 01-18-2002 03:26 AM
My program, anyhelp @licomb C Programming 14 08-14-2001 10:04 PM


All times are GMT -6. The time now is 11:44 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22