Problem with an array (Array index out of bounds)
Hey guys, i have a problem with an array, i just want to print a few things but it won't let me because of this error, here's my code
public static void MosDat()
{
int i;
for(i=0 ; i<n ; i++);
{
Client [ i ].print1();
Client [ i ].print2();
}
return;
}//MosDat
where "n" is a global variable, and client is .
I pretty much know how it woks, so i tried it like this and gave "n" the value of"1":
public static void MosDat()
{
int i;
for(i=0 ; i><n ; i++);
{
Client [ 0 ].print1();
Client [ 0 ].print2();
}
return;
}//MosDat
the printing methods i created worked prefectly when i tried it like that... so i really don't know where the problem could be... thanks anyone who can help me.>

