Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 132,373 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,156 people online right now. Registration is fast and FREE... Join Now!




tictactoe

 
Reply to this topicStart new topic

tictactoe, having a problem deciding how to display

lowwade
post 29 Oct, 2006 - 08:35 AM
Post #1


New D.I.C Head

*
Joined: 29 Oct, 2006
Posts: 2


My Contributions


CODE

#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?*/
User is offlineProfile CardPM

Go to the top of the page

Xing
post 29 Oct, 2006 - 08:47 AM
Post #2


D.I.C Addict

Group Icon
Joined: 22 Jul, 2006
Posts: 723



Thanked 2 times

Dream Kudos: 1575
My Contributions


Look into width() function of ostream class.
User is offlineProfile CardPM

Go to the top of the page

Reply to this topicStart new topic
Time is now: 11/22/08 05:53AM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month