I am very new to C++, or any kind of programming for that matter. I am having difficulty figuring out how to read and process specific data within an input file. Some values that I need to read are in the middle of the file or line.
Here is the input file I am working with. The file is from a hand history file playing blackjack online:
Stage # B506558848 - Blackjack 2009-02-13 14:51:22 (ET)
********** ( $30.00 in chips )
-----------------------------------------------------------------------
Hand 1-1: Bet $0.00 + Side Bet $0.00
Hand 2-1: Bet $5.00 + Side Bet $0.00
Hand 3-1: Bet $0.00 + Side Bet $0.00
-----------------------------------------------------------------------
Dealt to Hand 2-1: [ 5h 2s ]
Dealt to Dealer: [ 2s H ]
-----------------------------------------------------------------------
Hand 2-1: HIT
Dealt to Hand 2-1: [ 8s ]
Hand 2-1: STAND
-----------------------------------------------------------------------
Dealer: Hit
Dealt to Dealer: [ 3c ]
Dealer: Hit
Dealt to Dealer: [ 5s ]
Dealer: Hit
Dealt to Dealer: [ Ks ]
-----------------------------------------------------------------------
*** RESULT ***
Dealer [ 2s 3c 5s Ks ] (20)
Total Bet( $5.00 ), Win/Loss( -$5.00 )
Hand 2-1 [ 5h 2s 8s ] (15) - Loses $5.00
What I am trying to accomplish is to have the program determine whether the hand was a win, a loss, or a push. The last line contains the value "Loses", which I want to use as the value to determine a win, loss, push. I was thinking of using the ignore function, but a string value cannot be used as a parameter. If anyone could point me in the right direction I'd appreciate it!