Updating and saving selected seats to a file

Very new to programming and extremely new with file input output. Was wondering if anyone has any suggestions on a movie theater chart. What I'm trying to do is bring up a file that has avaliable seats, user picks row and seat number, then that is saved back onto the file. # (available seats) * (taken seats).
Any direction or advice is greatly appreciated. I'm able to create a .txt with the #-indicating available seats, I'm also able to ask the user which seats they want but I'm not sure how to have the program change the # to * and store that back into the file.
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
33
34
                do
                {
                    cout << "Please select the row you would like to sit in: ";
                    cin >> row2;
                    cout << "Please select the seat you would like to sit in: ";
                    cin >> column2;
                    if (map [row2] [column2] == '*')
                        {
                            cout << "Sorry that seat is sold-out, Please select a new seat.";
                            cout << endl;
                        }
                    else
                    {
                        cost = row2;
                        total = total + cost;
                        cout << "That ticket costs: " << cost << endl;
                        cout << "Confirm Purchase? Enter (1 = YES / 2 = NO)";
                        cin >> answer;
                        seat = seat - answer;
                        seat2 += answer;

                        if (answer == 1)
                        {
                            cout << "Your ticket purchase has been confirmed." << endl;
                            map [row2][column2] = FULL;
                        }
                        else if (answer == 2)
                        {
                            cin >> Quit;
                        }

                    }
                }
                while (Quit == 1);


I don't even think this snippet is accurate.
Topic archived. No new replies allowed.