tictactoe

having a problem deciding how to display

Page 1 of 1

1 Replies - 1083 Views - Last Post: 29 October 2006 - 09:47 AM Rate Topic: -----

#1 lowwade  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 29-October 06

tictactoe

Posted 29 October 2006 - 09:35 AM

#include <iostream>
#include <string>
#include <cmath>

using namespace std;

int main(){

	char board[] = {"		|	| 	\n		|	| 	\n		|	| 	\n 	   -----+-------+----- \n	 	|	| 	\n		|	| 	\n		|	| 	\n 	   -----+-------+-----\n	 	|	| 	\n		|	| 	\n		|	| 	"};
			 	 
	cout << board;




	





	
	
/*	char table[11][11] = {
			   { , , ,|, , , ,|, , , ,},
			   { , , ,|, , , ,|, , , ,},
			   { , , ,|, , , ,|, , , ,},
			   {-,-,-,+,-,-,-,+,-,-,-,},
			   { , , ,|, , , ,|, , , ,},
			   { , , ,|, , , ,|, , , ,},
			   { , , ,|, , , ,|, , , ,},
			   {-,-,-,+,-,-,-,+,-,-,-,},
			   { , , ,|, , , ,|, , , ,},
			   { , , ,|, , , ,|, , , ,},
			   { , , ,|, , , ,|, , , ,}
	
	
			}*/

/*these are what i have come up with so far,  just need help deciding which one will be the easiest to use later in coding?  any ideas?*/



Is This A Good Question/Topic? 0
  • +

Replies To: tictactoe

#2 Xing  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 19
  • View blog
  • Posts: 725
  • Joined: 22-July 06

Re: tictactoe

Posted 29 October 2006 - 09:47 AM

Look into width() function of ostream class.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1