so I wanted to convert an integer into a string but using itoa isn't standard so through my research I figured the best way to do it would be to use OStringStream. Here's some pseudo-code:
#include <iostream>
#include <cmath>
#include <cstdlib>
std::string plusMinus(int x) {
std::ostringstream x_str;
// more code here obviously
}
int main(int argc, const char * argv[])
{
// some cin/cout functions here
}
I get an error on the "std::ostringstream line: "Implicit instantiation of undefined template". What does this mean? I've tried putting "using namespace std;" at the top but it has no effect.