0

how to declare an arraywith unspecified length dynamically?

for example array of byte for storing images

29th Jun 2017, 2:18 PM
Saeed Noruzi
Saeed Noruzi - avatar
1 Resposta
+ 2
If you don't know the size of array, you should use dynamic container. The most appropriate in such cases is vector. Just create vector<char> or vector<int8_t> for the byte array.
30th Jun 2017, 6:15 AM
soman