What exactly is wrong with this section of code. All I want to do is read in numbers into a 4X4 array and then output them to the screen in a 4X4 pattern. Please let me know what I am doing wrong ASAP. Thanks!

P.S. Is there a way to enter the numbers by row (separated by spaces) instead of each individual like I am doing? If so, how? Thanks again!

it is bad ... because ones you used to it... even if you read your sintax for the first and the second and the third time ... you want be able to catch your mistake... but I think that the compiler should give you worning for that...
let me try it....

I know that you are in hurry ... but read that carfully...
:o

04-17-2002

NANO

I tried it... it works

even with " ;" it works ... but hte compiler will not give you any kind of misstake ....

it won't give you any kind of misstake...
you better be carfull next time...

I hope that helped you ....

04-17-2002

Gr3g

?

What does the "{0}" do in

int grid[4][4]={0};

Thanks

Gr3g

04-17-2002

Dual-Catfish

Gr3g: Fills the entire array with 0.

for (i = 0; i < 10; i++);
{
stuff;
}

The for loop ends on the same line it is created, then the brackets are just used to specify code blocks.

{
stuff;
}

04-17-2002

Gr3g

oh ok i normally just use a for loop to fill my arrarys with regular data...

int blah[9][9];

for(int i=0;i<9;i++)
{
for(int x=0;x<9;x++)
blah[i][x]=0;
}

Thanks

04-17-2002

Dual-Catfish

So do I :)
Habit I guess...

Oh, and also, you can't refill your arrays using the above method... you must loop through like you stated.

04-18-2002

NANO

Good happet...

Thanx,
Atarting by today... I will try to write in the same way ....
It is Great....
but all copyright registared for you Dear....