Closed SvenKratz closed 5 years ago
This issue can be fixed by installing the current version of json.hpp
I had the same problem. It can also be fixed by moving json.hpp to the top of the includes list in main.cpp. I have a pull request to fix this.
@tawnkramer. Your solution is not optimal.
The reason for this error is:
json.hpp is using std::array instead of its own array.
and why this happen is because the #include "MPC.h" has a bad practice of using namespace std
in the header file.
That is why if you list the #include "json.hpp" above #include MPC.h will solve the problem.
The actual solution should be remove the using namespace std
in the MPC.h and use it only in the .cpp files.
Thanks for the notes here - have updated MPC.h as @Tsuihao noted.
due to the removal of the std namespace there came up several compilation errors. i fixed them and created a pull request: https://github.com/udacity/CarND-MPC-Project/pull/41
There is a problem with json.hpp, and I did use the installation scripts from the repository: