1 Replies - 825 Views - Last Post: 29 December 2010 - 05:46 AM Rate Topic: -----

#1 AvL  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 10
  • Joined: 21-October 10

Tic Tac Toe with classes

Posted 29 December 2010 - 05:31 AM

Hello !

I have a question about some errors i can't solve, whatever i've tried and i would be very grateful if i could get some feedback on what i am doing wrong .

My task is to create a Tic Tac Toe game ,network game, with classes, inheritance, multiple Board types : 5 b y5 to 9 by 9, and winning is when a player has clicked 5 squares, not 3; in c++Builder 6

I want to start with a class named Board that loads a jpeg/bmp on a form (my task is to create a Tic Tac Toe game ,network game, with classes, inheritance, multiple Board types : 5 b y5 to 9 by 9, and winning is when a player has clicked 5 squares, not 3; in c++Builder 6)
--------------------------
class Board {
public: String A; //the path to the file
Board();
Board(String A0);
~Board();
void printBoard(*TImage imgDefault); //the object (image on a form) that will load the image from the file with the path A
};
------------------------------
Board::Board(String A0){A=A0;}
Board:: ~Board(){}
void Board::printBoard(*TImageBoard::Board(String A0){A=A0;}
Board:: ~Board(){}
void Board::printBoard(*TImage ){
imgDefault->Picture->LoadFromFile(A);
}

-------------------------
The error i get is : )expected where the writing is bold.
I also get ""size of ''printBoard' is unknown or zero" & "Multiple declaration for Board::printBoard" if i delete the name of the TImage variable imgDefault.

I would be very grateful if anyone can spot the mistakes i've made,and i think i've made many.Thank you !

Is This A Good Question/Topic? 0
  • +

Replies To: Tic Tac Toe with classes

#2 AvL  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 10
  • Joined: 21-October 10

Re: Tic Tac Toe with classes

Posted 29 December 2010 - 05:46 AM

I have sorted it out (and i don't know how to delete the post , as i no longer need a response to it ) , but promise to come back with fresh,new errors;)
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1