How to pass array of STL list by reference
I am a beginner in C++ STL. I learnt STL tutorials and I am implementing "number of connected components in Graph" using adjacency list created with STL lists. I wanted to know how to pass this array of list by reference to dfs function? Also, one of my frnd said that by default it will be passed by reference. Is it true? Please clarify. which of these is right?

for example:

 1. My array of list: list<int> L[v]; 
 2. My function call: dfs(L[v],k);
 3. My function definition: void dfs(list<int> List, int index)
 4. My function prototype: void dfs(list<int> L, int);

(or)

 1. My array of list: list<int> L[v]; 
 2. My function call: dfs(L,k); 
 3. My function definition: void dfs(list<int> *L, int index)
 4. My function prototype: void dfs(list<int> *, int);
How to pass array of STL list by reference
===

I am a beginner in C++ STL. I learnt STL tutorials and I am implementing "number of connected components in Graph" using adjacency list created with STL lists. I wanted to know how to pass this array of list by reference to dfs function? Also, one of my frnd said that by default it will be passed by reference. Is it true? Please clarify. which of these is right?

for example:

 1. My array of list: list<int> L[v]; 
 2. My function call: dfs(L[v],k);
 3. My function definition: void dfs(list<int> List, int index)
 4. My function prototype: void dfs(list<int> L, int);

(or)

 1. My array of list: list<int> L[v]; 
 2. My function call: dfs(L,k); 
 3. My function definition: void dfs(list<int> *L, int index)
 4. My function prototype: void dfs(list<int> *, int);