# "cannot acces private member" Error with Compiling C++ Projects in VScode

**URL:** <https://forums.unrealengine.com/t/cannot-acces-private-member-error-with-compiling-c-projects-in-vscode/1721851>\
**Category:** C++\
**Tags:** unreal-engine, crash, CPP, question\
**Created:** [March 1, 2024, 5:04am UTC](https://forums.unrealengine.com/t/cannot-acces-private-member-error-with-compiling-c-projects-in-vscode/1721851 "2024-03-01T05:04:16Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Arodi007](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/arodi007/32/1022275_2.png) [@Arodi007](https://forums.unrealengine.com/u/Arodi007)\
**Post date:** [March 1, 2024, 5:18am UTC](https://forums.unrealengine.com/t/cannot-acces-private-member-error-with-compiling-c-projects-in-vscode/1721851/2 "2024-03-01T05:18:47Z")

</div>

From what i seen other people with visual studio are getting the same issue as well when they update to latest version.

> [@Failure to create a new project: "cannot access private member declared in class 'FHazardPointerCollection::FHazardRecord'"](https://forums.unrealengine.com/t/failure-to-create-a-new-project-cannot-access-private-member-declared-in-class-fhazardpointercollection-fhazardrecord/1548295/17):
>
> Just to wrap up this thread you have three options. I would do them in this order if you can. Option 1: Rollback to 17.8.x in Visual Studio How To: Downsides: If you did not install 17.8 you cannot roll back to it. Option 2: Update to Preview Version How To: Same as above but select “Update” Settings and select Preview instead of current. Downsides: Previews can be less stable so it may have conflicts with your particular project. (This is unlikely though) Option 3: Make t…

VS code most likely using the code as visual studio i guess, you can try an older version if that can help.

---

_[View the full topic](https://forums.unrealengine.com/t/cannot-acces-private-member-error-with-compiling-c-projects-in-vscode/1721851)._
