What I would call "dynamic arrays" is when you manually allocate and/or reallocate memory for an array. Vector does that too, but it's done behind the scenes so you don't need to worry about it.
...
Type: Posts; User: matsp
What I would call "dynamic arrays" is when you manually allocate and/or reallocate memory for an array. Vector does that too, but it's done behind the scenes so you don't need to worry about it.
...
Certainly, numbers[i] will not be set to '\0' when you reach the end of file - it will just be whatever happens to be on that location.
--
Mats
Ah, good catch, I didn't spot the wrong way slash - although, as it's still got single quotes, it's actually a 'multicharacter constant', so it's value is 0x2F, 0x30 (combined in whatever byte order...
It would work if you mark the end of the list with a 0 [and assuming that zero is not a "useful" number in your list].
Of course, if you do something like this:
void readNumbers(istream fin,...