PayTableModelLayer::PayTableModelLayer()
:m_sName(NULL)
{
// for (int i = 0; i < MAX_SYMBOL_COUNT; i++)
// {
// m_nodePayTable[i] = NULL;
// }
}
string m_sName
问题出在了m_sname是个字符串变量不应该初始化成NULL,指针初始化成NULL,查阅stackFlow给出如下解释
string a=NULL;
it gives error. Why and how can I initialize string as NULL?
but when I write
string a="foo";
this it works fine.
string a = "";
– Borgleader Dec 16 '12 at 0:04NULL
to it, but dont forget to use properlynew
anddelete
– Zaffy Dec 16 '12 at 0:18string a;
? – sbi Dec 16 '12 at 0:23