error message: no copy constructor available for 'CStringArray'
-
I create a member function with a CStringArray type variable in the argument list. I got the following error message " no no copy constructor available for the class 'CStringArray' Is there are any solutions or workarounds. Thank you
-
I create a member function with a CStringArray type variable in the argument list. I got the following error message " no no copy constructor available for the class 'CStringArray' Is there are any solutions or workarounds. Thank you
You can not use pass an object of a CStringArray since it has no CopyContructor or assignment operator. One thing you can do is to pass a reference to the string array. eg: // use void function( CStringArray& csStringArray_i ) { } // instead of void function ( CStringArray csStringArray_i ) { } // One thing is to be noted down is not to pass any local variable of CStringArray to the function it may not work properly, especially playing with multiple threads.
-
I create a member function with a CStringArray type variable in the argument list. I got the following error message " no no copy constructor available for the class 'CStringArray' Is there are any solutions or workarounds. Thank you
cy163@hotmail.com wrote:
" no no copy constructor available for the class 'CStringArray'
CStringArray does not have a copy constructor. Use a reference instead...
bool PassingCStringArray( CStringArray**
&
** csaArray );
Nibu thomas A Developer Programming tips[^] My site[^]