Hello
I am confused with an error saying.
Error 1 error C2664: 'const char *TiXmlElement::Attribute(const char *) const' : cannot convert parameter 1 from 'char *(__cdecl *)(void)' to 'const char *' c:\GameProject\TheGameProject\ContentManager\src\NodeWater.cpp 38
I have a method that returns a const char* as follows
class XMLNodeNames
{
public:
static struct NODES {
const static char* NODE_WATER_ATTR_ENABLE()
{
return "enable";
}
}
};
I am using this return value as follows
void NodeWater::processNode(TiXmlElement *element)
{
element->Attribute (XMLNodeNames::NODES::NODE_WATER_ATTR_ENABLE);
...
}
This is the element element->Attribute definition
const char* Attribute( const char* name ) const;
But it gives me this
error C2664: cannot convert parameter 1 from 'char *(__cdecl *)(void)' to 'const char *'
error
Could you please help me with find the answer?
Thank you