Share via

Compilation issue (vs2019 C++)

cyl cyl 1 Reputation point
2022-12-30T09:34:19.117+00:00

Compiling the program in vs2019 failed with platform toolset v142, and then successfully compiled with platform toolset v140 when class variables vector array and atomic var are involved.

e.g.
std::vector<int> m_vN[10];
std::atomic<bool> m_vB;

error code
C2711
C3821

Developer technologies | C++
Developer technologies | C++

A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.

{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.