Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis0
The size of first dimension (first index) is optional in array initialization. Explain
The size of first dimension (first index) is optional in array initialization. Explain
1 Resposta
+ 1
In declaring an array as array[] as opposed to array[10], the first option creates an array just big enough for initialization. The second, creates an array size = 10, regardless of what you initialize it to, even if it's empty. Hope that helps. If you need dynamic arrays, look into vectors.