Search:

Type: Posts; User: matsp

Search: Search took 0.09 seconds.

  1. Replies
    9
    Views
    1,839

    What I would call "dynamic arrays" is when you...

    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.
    ...
  2. Replies
    9
    Views
    1,839

    Certainly, numbers[i] will not be set to '\0'...

    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
  3. Replies
    9
    Views
    1,839

    Ah, good catch, I didn't spot the wrong way slash...

    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...
  4. Replies
    9
    Views
    1,839

    It would work if you mark the end of the list...

    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,...
Results 1 to 4 of 4