First off, the book does not pass by reference.
Now, first you must separate C arrays and C++ arrays, because they behave differently. Avoid C arrays if you can.
C arrays are declared like
T...
Type: Posts; User: Elysia
First off, the book does not pass by reference.
Now, first you must separate C arrays and C++ arrays, because they behave differently. Avoid C arrays if you can.
C arrays are declared like
T...
I will point out 3 things:
>>for (int i=0; i<contacts.size(); i++)
Beware that .size() does not return an int. It returns std::vector<your_type>::size_t, often commonly written as std::size_t...