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

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

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