How many elements of an array can I define?
Thank you:)
Printable View
How many elements of an array can I define?
Thank you:)
What is your OS? Your compiler?
Usually 18446744073709551615, if you are on an old 32-bit machine/compiler then usually 4294967295.
Standard stack arrays are typically limited by the size of the stack, which is typically a few MB. Vectors or dynamic arrays on the heap can be much larger, in theory up to the size of the process address space. In practice, memory fragmentation typically reduces the effective maximum size to about half that.