dimanche 6 juin 2021

#include

Was writing some code, then tried to launch it, and got about 500 errors.

After some time, I created a new project and started removing pieces of code I wrote to detect what causes the error.

I ended up with this:

#include <random>
int main()
{
    return 0;
}

And to my surprise, it didn't solve the errors! Still have about 50 errors, and when I try to compile the project I get this:

Build started ...
1> ------ Build started: project: test, Configuration: Debug Win32 ------
1> test.cpp
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (374.5): error C2760: syntax error: unexpected token "id"; "expression" is required
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (463): message: a reference to an instance of the class function template "std :: linear_congruential_engine <_Uint, _Ax, _Cx, _Mx> "
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (374,5): error C2187: syntax error: unexpected element "id" here
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (374.5): error C2062: "unsigned int" type is not required
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (374,1): error C2238: unexpected tokens before ";"
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (469.5): error C2760: syntax error: unexpected token "id"; "expression" is required
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (556): message: a reference to an instance of the class function template "std :: linear_congruential <_Uint, _Ax, _Cx, _Mx> "
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (469.5): error C2187: syntax error: unexpected element "id" here
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (469.5): error C2062: "unsigned int" type is not required
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (469,1): error C2238: unexpected tokens before ";"
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (865.5): error C2760: syntax error: unexpected token "id"; "expression" is required
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (925): message: a reference to an instance of the class function template "std :: subtract_with_carry_engine <_Ty, _Wx, _Sx, _Rx> "
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (865,5): error C2187: syntax error: unexpected element "id" here
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (865.5): error C2062: "unsigned int" type is not required
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (865,1): error C2238: unexpected tokens before ";"
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (1185.5): error C2760: syntax error: unexpected token "id"; "expression" is required
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (1261): message: a reference to an instance of the class function template "std :: mersenne_twister_engine <_Ty, _Wx, _Nx, _Mx, _Rx, _Px, _Ux, _Dx, _Sx, _Bx, _Tx, _Cx, _Lx, _Fx> "
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (1185,5): error C2187: syntax error: unexpected element "id" here
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (1185.5): error C2062: "unsigned int" type is not required
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (1185,1): error C2238: unexpected tokens before ";"
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (1410.5): error C2760: syntax error: unexpected token "id"; "expression" is required
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (1544): message: a reference to an instance of the class function template "std :: independent_bits_engine <_Engine, _Wx, _UIntType> "
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (1410,5): error C2187: syntax error: unexpected element "id" here
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (1410,5): error C2062: "unsigned int" type is not required
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (1410,1): error C2238: unexpected tokens before ";"
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSV C \ 14.29.30037 \ include \ random (1863.5): error C2760: syntax error: unexpected token "id"; "expression" is required
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (1885): message: a reference to an instance of the class function template "std :: uniform_int_distribution <_Ty> "
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (1863.5): error C2187: syntax error: unexpected element "id" here
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (1863.5): error C2062: "unsigned int" type is not required
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (1863,1): error C2238: unexpected tokens before ";"
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (2062.5): error C2760: syntax error: unexpected token "id"; "expression" is required
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (2164): message: a reference to an instance of the class function template "std :: geometric_distribution <_Ty> "
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (2062.5): error C2187: syntax error: unexpected element "id" here
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (2062.5): error C2062: "unsigned int" type is not required
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (2062,1): error C2238: unexpected tokens before ";"
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (2222.5): error C2760: syntax error: unexpected token "id"; "expression" is required
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (2347): message: a reference to an instance of the class function template "std :: poisson_distribution <_Ty> "
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (2222.5): error C2187: syntax error: unexpected element "id" here
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (2222.5): error C2062: "unsigned int" type is not required
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (2222,1): error C2238: unexpected tokens before ";"
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (2379.5): error C2760: syntax error: unexpected token "id"; "expression" is required
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (2554): message: a reference to an instance of the class function template "std :: binomial_distribution <_Ty> "
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (2379.5): error C2187: syntax error: unexpected element "id" here
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (2379.5): error C2062: "unsigned int" type is not required
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (2379,1): error C2238: unexpected tokens before ";"
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (4272.5): error C2760: syntax error: unexpected token "id"; "expression" is required
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (4388): message: a reference to an instance of the class function template "std :: negative_binomial_distribution <_Ty> "
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (4272.5): error C2187: syntax error: unexpected element "id" here
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (4272.5): error C2062: "unsigned int" type is not required
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (4272,1): error C2238: unexpected tokens before ";"
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (4418.5): error C2760: syntax error: unexpected token "id"; "expression" is required
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (4587): message: running compiling an instance reference class function template "std :: discrete_distribution <_Ty>"
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (4418.5): error C2187: syntax error: unexpected element "id" here
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (4418.5): error C2062: "unsigned int" type is not required
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (4418,1): error C2238: unexpected tokens before ";"
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (4418.5): error C2059: syntax error :,
1> C: \ Program Files (x86) \ Microsoft Visual Studio \ 2019 \ Community \ VC \ Tools \ MSVC \ 14.29.30037 \ include \ random (4418): error C2062: "unknown-type" is not required
1> Build of the project "test.vcxproj" completed with an error.
========== Build: success: 0, with errors: 1, no changes: 0, skipped: 0 ========== 



Aucun commentaire:

Enregistrer un commentaire