Can't create TCollection_HAsciiString.

I\'m trying to add materials to my step export/import module. But can\'t create any TCollection_HAsciiString and AddMaterials(...) requires \"const Handle(TCollection_HAsciiString)&\".

Here\'s the line :

Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString(\"Whatever\");

Returns this compiler error :
error C2661: \'Standard_Transient::operator new\' : aucune fonction surchargée ne nécessite 3 arguments
Which means : \"no overloaded function requires 3 arguments\"
I included \"handle_TCollection_HAsciiString.hxx\" and \"TCollection_HAsciiString.hxx\".
What is wrong with my code ?

And btw ,I didn\'t found any documentation about materials and I don\'t understand what are the two last arguments of AddMaterials for : const Handle(TCollection_HAsciiString)& aDensName and const Handle(TCollection_HAsciiString)& aDensValType. What are they for ?


Denis Teissandier's picture


Handle_TCollection_HAsciiString aName= new TCollection_HAsciiString("test");
cout<<"aName= "<Value(1)<

S's picture

I tried but, these lines too provokes the same error ...

Stephane Routelous's picture

it's the old "DEBUG_NEW" issue



S's picture

Thanks ! Its works nicely now.

Where can i find documentation about materials please ?