Search:

Type: Posts; User: vart

Search: Search took 0.08 seconds.

  1. Replies
    11
    Views
    1,029

    Here is the whole code that I used to test the...

    Here is the whole code that I used to test the CountContact function


    #include <iostream>
    #include <string>
    #include <vector>

    void CountContact(const std::vector<std::string>& contacts);
    ...
  2. Replies
    11
    Views
    1,029

    when you need to modify object the pass by...

    when you need to modify object the pass by reference is only reasonable choice.

    When you do not need to modify object - you can pass by const reference or by value...

    For small types (let's say...
  3. Replies
    11
    Views
    1,029

    I would get rid of the global variable and pass...

    I would get rid of the global variable and pass the vector by reference or const reference to each function that should access it

    for example



    void CountContact(const...
Results 1 to 3 of 3