I just wanted to know of the scope of the STL containers.
For eg. //Have a function which creates an unordered_map and passes to set_map to fill values in it.
int foo() {
unorderd_map<char,int>mymap;
set_map(mymap);
}
set_map (unorderd_map<char,int> mmap){
//...setting values of map
}
In this case will the scope of mymap in foo be limited to the function foo() only or mymap is passed by reference to set_map() and whatever changes done in set_map will be reflected to mymap in foo() ?
I also wanted to know how are still containers passed as function parameters, i.e. are they passed by value or they are passed by reference.
Thank You