Thursday, September 20, 2007

Handy C++ Compiler Errors

I love 'em!

This handy error:
node.cc: In member function ‘virtual void Node::initialize()’:
node.cc:14: error: no match for ‘operator=’ in ‘((Node*)this)->Node::neighbours = (((const std::allocator&)((const std::allocator*)(& std::allocator()))), (((std::list >*)operator new(8u)), (->std::list<_tp,>::list [with _Tp = Node*, _Alloc = std::allocator](), )))’
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/bits/list.tcc:120: note: candidates are: std::list<_tp,>& std::list<_tp,>::operator=(const std::list<_tp,>&) [with _Tp = Node*, _Alloc = std::allocator]
... simply means: You forget a "*", idiot!



2 comments:

beppe said...

uhm... are you using Omnet?? :P

Beppe

chris said...

I do indeed ;)