February 20th, 2013, 05:55 PM
A question regarding stl set
Here is the code,
If I call foo(*it), then I get an error " error C2664: 'foo' : cannot convert parameter 1 from 'const A' to 'A &' ". But if I call foo(a), then it would compile just fine. Why? What is the difference between a and *it. I thought they are basically the same. Thanks.
using namespace std;
void foo(A& a)
a = *it;
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.