Search:

Type: Posts; User: Elysia

Search: Search took 0.23 seconds.

  1. Replies
    29
    Views
    2,237

    Using arrays over vectors is never convenient. If...

    Using arrays over vectors is never convenient. If it is, you are doing something very wrong.


    Yes. Complicated programs, lots of bugs and frustration.
    It's akin to learning something by hand in...
  2. Replies
    29
    Views
    2,237

    Fixed.

    Fixed.
  3. Replies
    29
    Views
    2,237

    It most certainly is, since it saves time,...

    It most certainly is, since it saves time, frustration and bugs, and it is what makes C++ C++. Otherwise you can just start off with C. What's the point? Low-level stuff is only necessary for the...
  4. Replies
    29
    Views
    2,237

    Pointer arithmetic. *(p + n) = p[n] I feel...

    Pointer arithmetic.
    *(p + n) = p[n]


    I feel bad I missed that reply -_-
    I blame it on not getting an email notification.
  5. Replies
    29
    Views
    2,237

    Of course. But do you have to understand how...

    Of course. But do you have to understand how arrays work to use vector? No.
    Do you have to understand how vectors and iterators work to create algorithms? Yes.
    My point being that while you have to...
  6. Replies
    29
    Views
    2,237

    C++ has std::array and std::vector. C arrays be...

    C++ has std::array and std::vector. C arrays be damned.
    They're unsafe. You can't query their size. You can't get bounds checking. And they don't work well with all standard library functions...
  7. Replies
    29
    Views
    2,237

    Then you can just dump C++ and go C. C arrays...

    Then you can just dump C++ and go C.
    C arrays are not needed to learn C++.
  8. Replies
    29
    Views
    2,237

    Don't do that! Use std::vector. Sheesh.

    Don't do that! Use std::vector.
    Sheesh.
  9. Replies
    29
    Views
    2,237

    Use std::vector.

    Use std::vector.
  10. Replies
    29
    Views
    2,237

    No. Global variables should be avoided. Using...

    No. Global variables should be avoided.
    Using them in this situation is even worse.


    Use std::vector.
    Better yet, pass the vector in to the function as a reference in order to avoid relying on...
Results 1 to 10 of 10