Tic Tac Toe Homework

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Feb 2005
Posts: 10
Reputation: notdumb is an unknown quantity at this point 
Solved Threads: 0
notdumb notdumb is offline Offline
Newbie Poster

Tic Tac Toe Homework

 
0
  #1
Mar 15th, 2005
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, 190 views)
Reply With Quote Quick reply to this message  
Join Date: Apr 2004
Posts: 4,335
Reputation: Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future 
Solved Threads: 236
Team Colleague
Dave Sinkula's Avatar
Dave Sinkula Dave Sinkula is offline Offline
long time no c

Re: Tic Tac Toe Homework

 
0
  #2
Mar 16th, 2005
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.
  1. void draw(char box [9]);
  2. void draw()

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.

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.
"One of the methods used by statists to destroy capitalism consists in establishing controls that tie a given industry hand and foot, making it unable to solve its problems, then declaring that freedom has failed and stronger controls are necessary." --Ayn Rand
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC