How to pass the multi_array to the function? 
Author Message
 How to pass the multi_array to the function?

    And I need the data getted in the function can be returned to
the upper level. How can I tackle this problem? I ask a question about
the array as parameter before, and the kind man pull me out of  it.but  I
apply the rules to the multi_array.It  seems have more complex features.It's
confusing me.

My program as following:
  The function:
       BOOL FindNewFiles(char* pNewsData[], long&  nNewsLen[ ],short

      //I passed the parameter pNewsData[2][100], nNewsLen[] to the
function. And the parameters are
     // filled with the calculated data and return to the upper level
     // The function should be accessed as following:
        //BOOL FindNewFiles(char* pNewsData[], long nNewsLen[],short&
             for(int i = 0 ; i< nDirListSize; i++)           //The
nDirListSize is defined as 2.
          pFilezip = new unsigned char[*nNewsFileLength[nDirListSize]];
          memset(pFilezip,0,(unsigned int)nNewsFileLength[nDirListSize]);
          ResponseHeader.nType = PKG_TYPE_NEWSFILE;
          ResponseHeader.nContentLen =(int)*nNewsFileLength[nDirListSize];
          if(compress(pFilezip, &nFileLengthZip, pNewsFile[nDirListSize],
*nNewsFileLength[nDirListSize]) != Z_OK)
          if (!SendBuffer(sock[index],(char
          if (!SendBuffer(sock[index],(char *)pFilezip,nFileLengthZip))
         delete pNewsFile[nDirListSize];
         delete pFilezip;

Tue, 14 Oct 2003 09:29:25 GMT  
 [ 1 post ] 

 Relevant Pages 

1. How to pass the multi_array parameters to the function?

2. Passing "callback" function to a function

3. passing a function to function.

4. Passing functions to functions?

5. Pointer to function passed to varargs function

6. HELP:Passing functions to functions(!)

7. Novice: Passing a function pointer to a function

8. Passing a function to a function the hard way

9. prototype (?) of function passed to function

10. Prototyping a function passed a pointer to a function

11. Passing functions to a C function?

12. Passing C++ Class Member Function to as a C Callback Function Parameter


Powered by phpBB® Forum Software