digitalmars.D.learn - Error: undefined identifier remove
- Patrick Chasco (21/21) Jun 10 2005 Hello
- Derek Parnell (6/33) Jun 10 2005 Are you use v0.126? It compiles fine for me (Windows XP)
Hello
I'm receiving an error when trying to call remove() on an associative array. I
can't seem to figure this out, as the documentation states that the proper way
to remove an item from an associative array is to use the remove method.
Thanks in advance.
The errors:
noba\scene.d(46): undefined identifier remove
noba\scene.d(46): function expected before (), not remove of type int
The relevant code:
typedef uint OBJECTID;
class ObjectBase
{
public void remove_child(ObjectBase o) 
{
// Error occurs on this line
children.remove(o.id);
}
public:
ObjectBase[OBJECTID] children;
OBJECTID id;
}
 Jun 10 2005
On Fri, 10 Jun 2005 20:31:00 +0000 (UTC), Patrick Chasco wrote:
 Hello
 
 I'm receiving an error when trying to call remove() on an associative array. I
 can't seem to figure this out, as the documentation states that the proper way
 to remove an item from an associative array is to use the remove method.
 
 Thanks in advance.
 
 
 The errors:
 noba\scene.d(46): undefined identifier remove
 noba\scene.d(46): function expected before (), not remove of type int
 
 The relevant code:
 typedef uint OBJECTID;
 class ObjectBase
 {
 public void remove_child(ObjectBase o) 
 {
 // Error occurs on this line
 children.remove(o.id);
 }
 
 public:
 ObjectBase[OBJECTID] children;
 OBJECTID id;
 }
Are you use v0.126? It compiles fine for me (Windows XP)
-- 
Derek Parnell
Melbourne, Australia
11/06/2005 10:36:32 AM
 Jun 10 2005








 
  
  
  Derek Parnell <derek psych.ward>
 Derek Parnell <derek psych.ward>