I am using Eclipse Juno, and Cygwin C++ compiler (latest version). I wanted to declare shared_ptr (haven't worked with this pointer before) as..
Included the memory header file.
int main(){
std::shared_ptr <int> pointer;
return 0;
}
but the compiler cannot resolve shared_ptr
. To solve this problem I have done the following steps:
Unfortunately, could not solve the problem. It would so nice of you if I get help. Thanks in advance.
You need to #include <memory>
in order for the compiler to know about std::shared_ptr
.