Como fazer o metodo addstr aceitar int e double com o uso dos metodos privados a seguir?
class Outstr{
private:
string out, pr[10], st[10];
int size, lmax;
string Str(int n){ // Converte inteiro para string
ostringstream ostr; // Output string stream
ostr << n;
return ostr.str();
}
string Str(double x, int d){ // Converte real para string, d decimais
ostringstream ostr; // Output string stream
ostr << fixed << setprecision(d) << x;
return ostr.str();
}
public:
Outstr() :out(""), size(0), lmax(0){};
void addstr(string prompt, string str){
pr[size] = prompt;
st[size] = str;
if (prompt.length()>lmax) lmax = prompt.length();
size++;
};