restrict the creation of an object
From: greymatter (greymatter_at_nospam.com)
Date: 03/26/04
- Next message: Maluk: "Re: Chained Exceptions in C++"
- Previous message: Michael Klatt: "Re: This says it all"
- Next in thread: Mike Wahler: "Re: restrict the creation of an object"
- Reply: Mike Wahler: "Re: restrict the creation of an object"
- Reply: Kevin Goodsell: "Re: restrict the creation of an object"
- Reply: Leor Zolman: "Re: restrict the creation of an object"
- Reply: Leor Zolman: "Re: restrict the creation of an object"
- Reply: Neil Vice: "Re: restrict the creation of an object"
- Reply: gtSasha: "Re: restrict the creation of an object"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 25 Mar 2004 23:48:05 GMT
Hi, would anyone know how to restrict the creation of an object. Lets say
that code specification required a maximum of 10 objects created at any one
time. I know that a static variable in a class could keep count of the
number of objects of any one kind created. But how can i tell the code not
to create more than 10 objects. So for example if my main() tried to create
an 11th object, the code would return with "Sorry, not possible to create
object". I dont understand how to do this.
Any help appreciated!
thanks
grey
- Next message: Maluk: "Re: Chained Exceptions in C++"
- Previous message: Michael Klatt: "Re: This says it all"
- Next in thread: Mike Wahler: "Re: restrict the creation of an object"
- Reply: Mike Wahler: "Re: restrict the creation of an object"
- Reply: Kevin Goodsell: "Re: restrict the creation of an object"
- Reply: Leor Zolman: "Re: restrict the creation of an object"
- Reply: Leor Zolman: "Re: restrict the creation of an object"
- Reply: Neil Vice: "Re: restrict the creation of an object"
- Reply: gtSasha: "Re: restrict the creation of an object"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
Loading