Closed shunjilin closed 5 years ago
I am using Ubuntu 18.04, gcc compiler and I installed the external dependencies locally, according to the instructions.
Perhaps something has changed in Ipopt and CppAD.
I guess as Json.hpp is not an external dependency, not explicitly including string might be fine.
Unrelated, but the virtual destructor and constructor for MPC seems to be redundant as MPC is not used in a polymorphic way
Wanted to leave an update here that I'm going through to refactor all of our C++ code in lessons and projects, so I'll come back to this once I get up to MPC (I'm through the Sensor Fusion content and will be starting Localization soon).
As part of that, I think you are probably right to have string
included, but we won't use using namespace std
, as that actually scopes in way too much. See a related article here.
We do currently do that in a lot of lessons, but I'm trying to re-do a lot of quizzes to only use what we need, e.g. using std::cout
, so that it shows best practices.
Agree, that would be better. Is there a way that someone can help out with testing the new implementations? I would be interested in revisiting the exercises in this term.
I'm going to go ahead and merge this for now just so students aren't having issues in the interim, since it's taking awhile to get to this one.
For the most part the implementations are just changing from a style-side, so not much to test, although I will certainly let you know if that changes!
Can you clarify where you were having issues with this from the starter code? Would also help to know your OS and compiler. It appears to compile fine without
using namespace std
, andstring
is already included becausejson.hpp
is the first include within main.cpp.