Although, if I were you, I'd study basic templates since they would simplify much of your code.
Yes, from a cursory look at your work it seems that you simply want a class that can hold anything as its string representation.
Actually you might not even need a separate class. What you need is something to turn stuff into their string representation and back. Boost libraries have lexical_cast for that, but it wouldn't be hard to write your own with stringstreams. (The difference with the C conversion functions is that you can turn anything, including user-defined classes, into string and back as long as operators << and >> have been overloaded for them.)
Most basic (more error checks could be added):
Code:
#include <iostream>
#include <string>
#include <sstream>
template <class From, class Into>
bool convert(const From& from, Into& into)
{
std::stringstream ss;
ss << from;
return ss >> into;
}
//example usage
int main()
{
//convert long into string
long n = 42;
std::string s;
convert(n, s);
//convert string into int
int i;
if (convert(s, i)) {
std::cout << "Success: " << i << '\n';
}
else {
std::cout << "Failed to convert " << s << " into int.\n";
}
}