Posted: Thu Jul 03, 2003 9:24 pm Post subject: (No subject)
ok, I changed the code around(see edit), but still, it won't output anything, the cursor just flashes. UBC_Wiskatos's works, except I don't know that much about what he did, apparently, I skipped the case section of the tutorial.
so what's wrong with it now?
Sponsor Sponsor
UBC_Wiskatos
Posted: Thu Jul 03, 2003 10:10 pm Post subject: (No subject)
Try this:
I don't think your original array values correspond to the shapes, I changed them in my code, but they're in their original form here. Anyway, the problem seems to be with the if seeing if the char is equal to a, b, or c. I think this should work.
I think the core problem is that you use double quotes instead of single quotes, since single quotes are for (single-character) chars.
code:
#include <iostream>
using namespace std;
int main ()
{
int tot, posx, posy;
int count = 0;
int pos [8][8];
for (int x= 0; x<8; x++)
{
for (int y= 0; y<8; y++)
{
pos [x][y] = 0;
}
}