Search:

Type: Posts; User: Elysia

Search: Search took 0.08 seconds.

  1. Replies
    15
    Views
    1,579

    A vector is an array, so of course you can copy...

    A vector is an array, so of course you can copy over the data. But you can't assign it directly. You have to use a loop.
  2. Replies
    15
    Views
    1,579

    A vector is an array with dynamic size....

    A vector is an array with dynamic size. Therefore, yes, you can access any element.
    You need to brush up on your C++. When you need to do something, look for the available C++ containers and...
  3. Replies
    15
    Views
    1,579

    o_O Why do you print code?

    o_O
    Why do you print code?
  4. Replies
    15
    Views
    1,579

    >>for(i = 0 ; i

    >>for(i = 0 ; i<=n; i++)
    This is a buffer overrun. Indexes go from 0 to size - 1, so if n is size, then n - 1 is the last element.
    Arrays in C++ are tricky, especially since there is no default...
Results 1 to 4 of 4