The assignment is to make a two player tic-tac-toe game. Here's what I have so far:
char board[9] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i'}, choice;
int index=0, player = 1,...
Type: Posts; User: Matsuya
The assignment is to make a two player tic-tac-toe game. Here's what I have so far:
char board[9] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i'}, choice;
int index=0, player = 1,...
Never mind, I've figured it out. Thank you.
It's to stop it at the end of the line so I can insert the average before going on to the next student.
Is there a way to make it go back to the beginning of the file?
It's averaging the next students scores, but I don't know how to fix that.
So the average function picks up where the grades function left off?
#include <iostream>
#include <fstream>
#include <cstdlib>
#include <cctype>
using namespace std;
void grades (ifstream& in, ofstream& out);
double avg (ifstream& in, ofstream& out);
I have it set to stop at the new line because if i have it stop at the end of the file, the out put file gets filled with a bunch of weird characters.
I have to take input from a file that has a list of students and there scores like.
The file looks like this:
Lake Mat 1 2 43 4 5 6 7 8 9 20
...
I've written my code for my homework, but when I execute it, rather than displaying the content of the file, it gets erased.
I can't figure out what I'm doing wrong.
Here's what I've written.