>CStringArray or CPtrArray to another variabe of the respective types. I get >the error message" no copy constructor available". You can use Copy function which is applicable to CPtrArray & CStringArray. Try the following sample program. CStringArray objArr1, objArr2; objArr1.Add("Charan"); o...
CStringArray::Copy将另一个数组复制到该数组;根据需要扩展该数组。 CStringArray::ElementAt在该数组中返回对元素指针的临时引用。 CStringArray::FreeExtra若高于当前的上限,则将释放所有未使用的内存。 CStringArray::GetAt返回给定索引位置处的值。 CStringArray::GetCount获取此数组中的元素数。
CStringArray::Copy 将另一个数组复制到该数组;根据需要扩展该数组。 CStringArray::ElementAt 在该数组中返回对元素指针的临时引用。 CStringArray::FreeExtra 若高于当前的上限,则将释放所有未使用的内存。 CStringArray::GetAt 返回给定索引位置处的值。 CStringArray::GetCount 获取此数组中的元素数。 CStringArray::Ge...
CStringArray b = a; // Cannot be done, no copy constructor defined Now, if you really want to assign a CStringArray to a CStringArray, you have to create your own copy constructor first. The way to do this is that you must derive a class from CStringArray, and create the copy in the...
CStringArray::Copy将另一个数组复制到该数组;根据需要扩展该数组。 CStringArray::ElementAt在该数组中返回对元素指针的临时引用。 CStringArray::FreeExtra若高于当前的上限,则将释放所有未使用的内存。 CStringArray::GetAt返回给定索引位置处的值。 CStringArray::GetCount获取此数组中的元素数。
有关使用CStringArray的更多信息,请参阅“Visual C++程序员指南”中的文章“集合”。具体成员包括:构造、绑定、GetSize、SetSize、GetUpperBound、操作符、FreeExtra、RemoveAll、GetAt、SetAt、ElementAt、GetData、SetAtGrow、Add、Append、Copy、InsertAt、RemoveAt和操作符。例如,可以通过这些成员对数组进行...
CStringArray::CopyCopia otra matriz a la matriz; aumenta el tamaño de la matriz si es necesario. CStringArray::ElementAtDevuelve una referencia temporal al puntero del elemento dentro de la matriz. CStringArray::FreeExtraLibera toda la memoria no usada por encima del límite superior actual. ...
Supports arrays of CString objects.class CStringArray :public CObject Remarks The member functions of CStringArr ay are similar to the member functions of class CObArray .Because of this similarity,you can use the CObArray reference documentation for member function specifics.Wherever you see a C...
void Copy( const CObArray&src ); Inserts an element (or all the elements in another array) at a specified index. voidInsertAt( INT_PTRnIndex, CObject*newElement, INT_PTRnCount=1 ); voidInsertAt( INT_PTRnStartIndex, CObArray*pNewArray ); Determines if the array is empty. BOOL IsEmpty...