17.04.2014, 12:15
RajatPawar, the indexes are wrong in the loop and it could cause run time error 4 if the rows were more than 3.
You can access any index you want of the 2nd dimension for all the rows. But it will work only for 2D arrays.
pawn Код:
#include <a_samp>
new dimarray[][] =
{
{10, 69, 27},
{22, 33, 44},
{15, 16, 9}
};
main() {}
public OnGameModeInit()
{
PrintArray(dimarray, 0, sizeof (dimarray));
return 1;
}
stock PrintArray(array[][], index, size)
{
for (new i; i != size; ++i) printf("%i", array[i][index]);
return 1;
}