Witam!
Otóż używam Code::Blocks 13.12 z kompilatorem GNU GCC Compiler.
I ten kod nie chce się skompilować:
#include <iostream>
#include <string>
#include <memory>
int main()
{
using namespace std;
unique_ptr<string> films(new string("ASD"));
return 0;
}
Wyświetlają się komunikat -> "error: 'unique_ptr' was not declared in this scope".
Czyżbym dołączał złą bibliotekę?
A może kompilator nie obsługuje tego typu wskaźników. auto_ptr działa dobrze. Co ciekawe, sam Code::blocks podpowiada składnie unique_ptr, więc chyba to ja coś źle robię.