Hi,

I have a class which works just fine if I create a single instance.
However if I create a vector of my class the following error comes up relating to having 'std::wostringstream' as a member of this class.

"error C2248: 'std::basic_ios<_Elem,_Traits>::basic_ios' : cannot access private member declared in class 'std::basic_ios<_Elem,_Traits>"

Now I use wostringstream for logging as it's easy to use & each instance will either write to console and/or a different log file.

Is there a simple solution or relatively straight forward alternative?

I really don't want to have to remove this and go back swprintf_s

Any help is appreciated.