Why does this 2[d] array crash when 'fill' command is used?
1 2 3 4 5 6 7 8
|
class b {
public:
string boardinfo[3][3];
} o_tic;
fill(&o_tic.boardinfo[0][0], &o_tic.boardinfo[0][0] + sizeof(o_tic.boardinfo), "-");
|
Any insight as to why this crashes on runtime?
EDIT:
NVM I changed "sizeof(o_tic.boardinfo)" to "3*3"
Last edited on
Topic archived. No new replies allowed.