I recently converted my Windows C++ application to a Linux c++ application and use a Windows subsystem with Debian to cross-compile to Linux. However, I get the following error by using the json library by nlohmann
no match for 'operator-' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<double> >::value_type {aka double}' and 'nlohmann::basic_json<>::value_type {aka nlohmann::basic_json<>}')
I get this error everywhere where I use an operator between a json element and a double for example. As an example:
MSE_total += pow(ref.z[j*multiplier] - actual[j]["z"], 2) / pow(ref.z[j*multiplier], 2);
This is the line that gives the error above. Should I explicitely state what type of variable is in the json? And how do I do this?