If I understand you correctly, you want to initliaze a class with a string?
Code:
#include <string>
class Class1
{
public:
Class1(const std::string &="")
public:
std::string s;
};
And the implementation
Code:
Class1::Class1(const std::string &var)
{
s= var;
}