Original Post
I am totally at my wits' end here, pulling my hair out and so on, getting some totally bizarre behaviour... I have a class like so: But when I try to use it: ... it just logs the word "(null)" and I get all sorts of crashes and stuff if I try to use it. I just don't get it!
#include <string>
class CXTemplate
{
private:
std::string m_strName;
public:
CXTemplate(const std::string& strName) : m_strName(strName) { }
const std::string& GetName() const { return m_strName; }
}
CXTemplate* t = new CXTemplate("Frame");
CLog::Get()->Log(t->GetName().c_str());