944,124 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 9288
  • C++ RSS
Mar 15th, 2005
0

Tic Tac Toe Homework

Expand Post »
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.
Attached Files
File Type: cpp tictactoey.cpp (6.3 KB, 444 views)
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
notdumb is offline Offline
10 posts
since Feb 2005
Mar 16th, 2005
0

Re: Tic Tac Toe Homework

Quote originally posted by notdumb ...
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.
C++ Syntax (Toggle Plain Text)
  1. void draw(char box [9]);
  2. void draw()

Quote originally posted by notdumb ...
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.

Quote originally posted by notdumb ...
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.
Team Colleague
Reputation Points: 2780
Solved Threads: 312
long time no c
Dave Sinkula is offline Offline
4,790 posts
since Apr 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: Distance between 2 points
Next Thread in C++ Forum Timeline: Combining a string To Label





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC