I am using the up to date compiler for gcc. Therefore my code can execute to_String() and stoi() but unfortunately the platform that I am trying to compile my code in has a much previous one and I want to add these two functions into the string class therefore I can use them in my code without any problem.This is one of each example of the errors I get.
Cabinet.cpp:93:25: error: 'to_string' was not declared in this scope
cout << to_string(id) << " not found"<<endl;
LabOrganizer.cpp: In member function 'void LabOrganizer::findClosest(int, int, int)':
LabOrganizer.cpp:294:38: error: 'stoi' was not declared in this scope
cc = stoi(arr1[i].substr(1,1))-1;
std::to_string?using namespace std;and do include the correct headers for the functions you wish to call.with 1998 gccare you an archeologist?std::string(or any other class). Nothing prevents you from implementing them, but put them in your own (or the global) namespace.