Search:

Type: Posts; User: Elysia

Search: Search took 0.21 seconds.

  1. Replies
    14
    Views
    2,002

    Maybe you should actually read what references...

    Maybe you should actually read what references are and what they do.
  2. Replies
    14
    Views
    2,002

    You can pass by reference. void...

    You can pass by reference.


    void foo(std::vector<T>& myvector)
    {
    myvector.push_back(/*blah*/);
    }

    std::vector<T> myvec;
    foo(myvec);
  3. Replies
    14
    Views
    2,002

    I don't understand what you are trying to point...

    I don't understand what you are trying to point out.
    It's up to your function whether or not it will modify the data passed as arguments or not. Pass a const reference if you don't want it to modify...
  4. Replies
    14
    Views
    2,002

    Your function takes vectors. Why are you trying...

    Your function takes vectors. Why are you trying to pass pointer to pointers to elements to it?
Results 1 to 4 of 4