Computer Science Canada

Arrays

Author:  Donny [ Sat May 07, 2011 11:57 pm ]
Post subject:  Arrays

Not sure if this is possible but i have
int clients[] = {1,2,3}

I want to be able to have an infinite number of numbers in the curly braces, like {1,2,3,4,5,6,7+) so that it can be as many as I need, i just need it to be an array but hold those numbers, any ideas?

Author:  Tony [ Sun May 08, 2011 12:38 am ]
Post subject:  RE:Arrays

Yes, get a Turing Machine http://en.wikipedia.org/wiki/Turing_machine

Quote:

it is more common to think of [memory tape] as stretching infinitely at both ends and being pre-filled with blanks except on the explicitly given finite fragment the tape head is on. (This is, of course, not implementable in practice.)


On the second though, get a theoretical TM.

Author:  apython1992 [ Sun May 08, 2011 10:09 am ]
Post subject:  RE:Arrays

I think OP may just be talking about a dynamic array. Check out ArrayList. Of course, the amount of material you can hold in there is limited by memory.

Author:  mirhagk [ Sun May 08, 2011 2:10 pm ]
Post subject:  RE:Arrays

Phew no guys, obvi just store the memory on the internets, cuz there is infinite internets lol.


: