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:21

lol << bitshifts;

Name: Anonymous 2011-02-08 15:31

<< is part of the ofstream right?

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

Name: Anonymous 2011-02-08 15:42

printf it is then.

Name: Anonymous 2011-02-08 15:48

Name: Anonymous 2011-02-08 16:30

Q: When linking binaries, I get warnings about stdio and printf all the
   time.  What gives?
A: Since the diet libc was written to make writing small programs
   possible, it also tries to assist in the process of seeing causes of
   bloat.  Premier causes for bloat are stdio and the printf family of
   functions.

Name: Anonymous 2011-02-08 17:17

>>4
printf(3)

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