A "new" instance
From: seesaw (seesaw_at_turboweb.com)
Date: 04/29/04
- Next message: Monster: "how are exception expensive?"
- Previous message: Phlip: "Re: "interface""
- Next in thread: Thomas Wintschel: "Re: A "new" instance"
- Reply: Thomas Wintschel: "Re: A "new" instance"
- Reply: John Carson: "Re: A "new" instance"
- Reply: John Harrison: "Re: A "new" instance"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 29 Apr 2004 04:48:47 GMT
class A
{
public:
static A* newA() { return new A; }
...
};
In the code, two things not very clear and natural to me:
1. the method newA() is defined as static.
2. newA as a member method of class A IS returning a "new" instance of A
while it is still defining class A.
Could someone elaborate the two for my retarded head?
Thanks!
- Next message: Monster: "how are exception expensive?"
- Previous message: Phlip: "Re: "interface""
- Next in thread: Thomas Wintschel: "Re: A "new" instance"
- Reply: Thomas Wintschel: "Re: A "new" instance"
- Reply: John Carson: "Re: A "new" instance"
- Reply: John Harrison: "Re: A "new" instance"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]