[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 557
  • Last Modified:

CArray <void *, void*> parameter problem

Hi all,
    I have this little fct. :
   
    void GetDataGroups(CArray<void*, void*> ptrDGroups);

    I fill my array in a loop:

    m_aPtrValidRefWaveForm.SetAtGrow(wNumberOfDGroup,
     hDGroup);
    (hDGroup is a void ptr.)

    And i implement my fct like this:


    void GetDataGroups(CArray <void *, void *> ptrDGroups)
{
     void *hDGroup = NULL;
     gdata_typeFDD refGDataFDD;

     for(int x = 0; x < ptrDGroups.GetSize(); x++)
     {
          hDGroup = ptrDGroups.GetAt(x);
          tvapi_DGroupGetCopy(hDGroup,
                &refGDataFDD);
     }
}

Is there a special way to have a CArray parameter because the compiler gives me an error:

C:\Tomoview 1.4R8\TVM\DovetailAutomaticAnalysis\DovetailAutomaticAnalysisDlg.cpp(308) : error C2664: 'GetDataGroups' : cannot convert parameter 1 from 'class CArray<void *,void *>' to 'class CArray<void *,void *>'
        No copy constructor available for class 'CArray<void *,void *>'


Thanks for the help...

Cheers
0
David MacDonald
Asked:
David MacDonald
1 Solution
 
migelCommented:
Hi!
use referencies
 void GetDataGroups(CArray <void *, void *>& ptrDGroups); <<!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now