I have this string s
and t
in class.
class A
{
private:
static string s;
string t;
public:
void printString()
{
cout<<s<<t<<endl;
}
};
I tried printing these string and everytime they were empty if not initialized. So my question is whether a class string is always empty before initialization by a constructor. Also is it true for both static and non static strings?