Please follow the MicroStation Programming forum best practices.
Code Syntax Highlighting
When you post code, use the Forum advanced editor's syntax highlighting tool. That's the icon that resembles a pencil: 
Memory Allocation
In general, use the C++ allocators and deallocators. You need only use the MDL dlmSystem_api when MicroStation allocates memory for you. For example...
FindFileInfo* pFileInfo = 0; mdlFile_findFiles (&pFileInfo, ..., ...); // Do something with pFileInfo dlmSystem_mdlFree (pFileInfo);
[quote user="Ines Wieland"]
//pBasic[i]=new CTriangle; //C++ pBasic[i] = (CTriangle*) dlmSystem_mdlCalloc(1, sizeof(CTriangle)); //v8i-MDL (static_cast<CTriangle*>(pBasic[i]))->operator = (static_cast(*psurf.pBasic[i])); //here it crashes, although this worked fine in C++
break; [/quote]
How is psurf.pBasic[i] allocated?