It is my first time working with STL containers in C++ and while seeing different examples in Google I noticed something on the way vectors and sets are declared.
If you have a class A and you want to store such elements in a vector, you use a pointer to an A object (as shown below). While for sets, you use the actual object in the declaration. I was wondering if there is a particular reason for doing this, or it just happens in the examples I saw.
vector<*A> cont1;
set<A> cont2;