Hy guys!
I'm preety new in C++ world and right now (actually since yesterday) i keep getting this compiler error form MSVC6 and it makes my hair turn white...
The error text is:
error C2514: 'NamedNodeMap' : class has no constructors
But, the class HAS constructors and i get this error when i try to create dinamically a new object:
b = new NamedNodeMap(source).
This should use the class copy constructor which is also defined.
here-s the class declaration:
In a separate header file I defined:
and what i'm trying to do is to create a new PNamedNodeMap object.
I have to tell you that i have some 22 (!) other classes in the project, all of them defined in this way and i only get the error for this class. Any help would be highly appreciated!
Thank you!
P.S. I just figgured out something but i'm not sure about this: the source passed to NamedNodeMap si a pointer (like the one defined above). I know that the copy constructor gets a reference, but shouldn't passing a pointer solve the problem? Nosferatu
We are what we eat...
There's no such thing as free meal...
I'm preety new in C++ world and right now (actually since yesterday) i keep getting this compiler error form MSVC6 and it makes my hair turn white...
The error text is:
error C2514: 'NamedNodeMap' : class has no constructors
But, the class HAS constructors and i get this error when i try to create dinamically a new object:
b = new NamedNodeMap(source).
This should use the class copy constructor which is also defined.
here-s the class declaration:
Code:
class NamedNodeMap {
private:
ulong length;
PNodeList list;
public:
NamedNodeMap();
NamedNodeMap(const NamedNodeMap& src);
virtual ~NamedNodeMap();
// Level 1
PNode getNamedItem(DOMString name);
PNode setNamedItem(PNode arg);
PNode removeNamedItem(DOMString name);
PNode item(ulong index);
//Level 2
PNode getNamedItemNS(DOMString namespaceURI, DOMString localName);
PNode setNamedItemNS(Node arg);
PNode removeNamedItemNS(DOMString namespaceURI, DOMString localName);
};
In a separate header file I defined:
Code:
typedef class NamedNodeMap * PNamedNodeMap;
I have to tell you that i have some 22 (!) other classes in the project, all of them defined in this way and i only get the error for this class. Any help would be highly appreciated!
Thank you!
P.S. I just figgured out something but i'm not sure about this: the source passed to NamedNodeMap si a pointer (like the one defined above). I know that the copy constructor gets a reference, but shouldn't passing a pointer solve the problem? Nosferatu
We are what we eat...
There's no such thing as free meal...