Is myClass derived from AcDbObject or AcDbEntity? If so then you should use
myClass pointers or AcDbObjectId's in your container.
If not, are you getting a complier error or a crash when push_back() is
reached. The error you indicate is a compiler error which suggests that
your copy constructor is not properly implemented. Since the allocator
creates another copy of the object, you are also doubling your memory
allocation/free cycle. Wouldn't it be better to create it on the heap (via
new) and delete it at the appropriate time?
|
----+----------------------------------------------
| Byron Blattel
| CADwerx---Applications for AutoCAD
| Autodesk Registered Developer
| email: byron@cadwerx.net
| web site: http://www.cadwerx.net
|
"Justus" wrote in message
news:5B2F0DB37CF79F0639B2279FEE31A73B@in.WebX.maYIadrTaRb...
> class myClass : AcDbObject {
> //...
> };
>
> //...
> void main() {
> std::vector myClassVector;
> myClass stuff;
>
> myClassVector.push_back(stuff); // causes error
> }
>
> the error is generated when the Allocator object calls the new funtion to
> store myClass. the error reads new does not take 2 paramiters.
>
> myClass has all nessisary functions to work in stl containers(copy
> constructor, comairison, assignment, ect.)
>
>
>
>