Change length of array
#1

is there ANY way to dynamicaly change length of array?

in c++ you can do this
pawn Код:
int *a, b = 2;
a = new int[b];
//this will create array a with size 2 (b)
any way to do this in pawn?
Reply
#2

No. All array sizes must be known at compile time. You can initialize an array's size with a constant variable, but that's it.
pawn Код:
const b = 2;
new a[b];
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)