# Unique Pointers

**URL:** <https://forum.codewithmosh.com/t/unique-pointers/17741>\
**Category:** C++\
**Created:** [January 17, 2023, 9:34pm UTC](https://forum.codewithmosh.com/t/unique-pointers/17741 "2023-01-17T21:34:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![swinston07](https://avatars.discourse-cdn.com/v4/letter/s/ea5d25/32.png) [@swinston07](https://forum.codewithmosh.com/u/swinston07)\
**Post date:** [January 17, 2023, 9:34pm UTC](https://forum.codewithmosh.com/t/unique-pointers/17741/1 "2023-01-17T21:34:19Z")

</div>

I’m trying to output a simple unique point using the unique\_ptr class and keep getting this error shown in the screen shot below. Any idea why?

 ![Screenshot (10)](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/2X/1/19f57faac8e7b7d078ec981a6e2620b4f1fb4f5a.png)

---

<div class="post-metadata">

**Author:** ![POMPOMBALLS](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/pompomballs/32/6610_2.png) [@POMPOMBALLS](https://forum.codewithmosh.com/u/POMPOMBALLS)\
**Post date:** [May 23, 2023, 2:52pm UTC](https://forum.codewithmosh.com/t/unique-pointers/17741/2 "2023-05-23T14:52:21Z")

</div>

I ran your code. It works perfectly fine on my IDE.

`operator<<` for `unique_ptr` was overloaded in C++20 language standard. So change your language standard as shown [here](https://code.visualstudio.com/docs/cpp/config-msvc#:~:text=You%20can%20view%20the%20C,json%20in%20the%20.vscode%20folder.).

 ![image](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/2X/3/3b32101d03ef713ce728449f676d4904d32d9934.png)

Change `"cppStandard": "c++17"` to `"cppStandard": "c++20"`.

You can explore libraries and classes updates with standards on [C++ reference](https://en.cppreference.com/). Though it is sometimes hard to see through the error, as many tutorials use older versions of C++ and we assume existence of a feature or function that has not yet been implemented (or was removed).
