954,492 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Tic Tac Toe Homework

Hello,

I am working on this tic tac toe program for my computer science class to develop a tic tac toe game that uses artifical intelegence for a computer player. Anyway, I have a few question, help with any or all.

First, I am getting unresolved externals errors. I do not know how to find where these are in my program when I get them. So my first question is, and I am using microsoft visual C++ 6.0 as a compiler, how do I find where the unresolved externals are to fix them? Every time I ask my teacher, she just fixxes it for me, so I dont know how to find them myself.

Second, as we only learned functions 3 weeks ago, I am not quite sure I have properly used function declarations, function calls, and function defenitions. Any input on how I have used these?

Last, I can tell my compplay function is unnessecarily complex, it just repeats looking for X's then O's using the same code. How could I condense this to be more efficient.

As always, thanks a bunch. I really appriciate those who give there time helping new commers.

Attachments tictactoey.cpp (6.28KB)
notdumb
Newbie Poster
10 posts since Feb 2005
Reputation Points: 10
Solved Threads: 0
 
First, I am getting unresolved externals errors. I do not know how to find where these are in my program when I get them. So my first question is, and I am using microsoft visual C++ 6.0 as a compiler, how do I find where the unresolved externals are to fix them? Every time I ask my teacher, she just fixxes it for me, so I dont know how to find them myself.

Make your prototypes match your definitions.

void draw(char box [9]);
void draw()
Second, as we only learned functions 3 weeks ago, I am not quite sure I have properly used function declarations, function calls, and function defenitions. Any input on how I have used these?

See previous.Last, I can tell my compplay function is unnessecarily complex, it just repeats looking for X's then O's using the same code. How could I condense this to be more efficient.You'll go far in programming.

I haven't looked very closely. But this exercise is more for you. Perhaps someone will provide a more specific hint.

Dave Sinkula
long time no c
Team Colleague
5,058 posts since Apr 2004
Reputation Points: 2,780
Solved Threads: 314
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You