Hello, Im writing this program for my CIS 251 class and cant figure out why it keeps crashing when i input the x's and o's. my teacher wants us to input it all at once, like x.oxo.x.o or like this
On line 55, switch char *line to char line[4] and it will work much better for you. Either way you're doing no bounds checking on the input so this should be fine.
Consider using getline(cin,line) and/or strings if your professor allows them. That way, you can clean the input much easier and don't run into seg faults.
Also, this program doesn't win on input: x.o oox o.x , which should let o win. Something to consider for later. :)