Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C++ Halp

Name: Anonymous 2011-02-08 15:17

http://pastebin.com/fTxQduPu

Trying to make a noughts and crosses board in C++.
The char array will assign the first 1 rows with the correct char, but the last row will be assigned jumbled values.

Any thoughts on why this is the case?

Name: Anonymous 2011-02-08 15:40

Real men use printf(1)


#define chr "%c"
#define ln chr"|"chr"|"chr"\n"
#define fmt ln ln ln
printf(fmt, board, board+1, board+2, board*sizeof(*board), board+1*sizeof(*board), board+2*sizeof(*board));
#undef fmr
#undef ln
#undef chr

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List