Reputation: 24760
I'm trying the elegant solution provided in this answer but no matter what I try, I cannot get passed the error Implicit instantiation of undefined template
for this line:
std::ostringstream strs;
What I need to do? I've included the following, which I'm sure is overkill. As a second question it seems hard to track down what exactly needs to be included for ostringstream:
#include <iostream>
#include <fstream>
#include <iosfwd>
#include <ios>
Upvotes: 25
Views: 16773
Reputation: 55887
stringstream
classes are defined in sstream
header, so write
#include <sstream>
and all will be fine.
Upvotes: 61