Hello guys, I recently started reading about arrays and how to sort integers etc.
Anyway, I have a stored data file with a list of clients, and I'm trying to set the array count to the numbers in the list. Then I will sort these clients in a Descending way with certain value.
PHP Code:
void SortDescending()
{
int iCount = GetTotalPlayersInTheList();
int iArray[iCount]; //Error Here
//Then I will do something with it
}
But it always gives me error
Quote:
|
brackets after variable name indicate a fixed-size array, but a dynamic size was given - did you mean to use 'new int[size]' syntax?
|
I would like only to know how to set "iArray" count to be equal to "iCount".
__________________