Adding to an array?
#9

Quote:
Originally Posted by -Luis
Посмотреть сообщение
I want to be able to add ints to an array. I have no idea how I can explain it.. Something like, when I type a command which chooses a random number, I want that random number to be added to an array.
Then assign an element of the array with a value? I mean, that's all there is to it.

pawn Код:
main ()
{
    new array[4];
    for(new i = 0; i < sizeof(array); i++)
    {
        array[i] = random(10);
        //printf("%d", array[i]);
    }
}
Reply


Messages In This Thread
Adding to an array? - by Luis- - 01.08.2012, 01:45
Re: Adding to an array? - by Squirrel - 01.08.2012, 03:03
Re: Adding to an array? - by Luis- - 01.08.2012, 03:21
Re: Adding to an array? - by Arca - 01.08.2012, 03:25
Re: Adding to an array? - by Luis- - 01.08.2012, 03:38
Re: Adding to an array? - by Luis- - 01.08.2012, 13:52
Re: Adding to an array? - by Disturn - 01.08.2012, 14:08
Re: Adding to an array? - by Luis- - 01.08.2012, 14:21
Re: Adding to an array? - by Disturn - 01.08.2012, 14:36
Re: Adding to an array? - by Luis- - 01.08.2012, 14:57

Forum Jump:


Users browsing this thread: 1 Guest(s)