Kohinoor24
June 10th, 2002, 10:03 AM
I need a solution for this.
I have a buffer char *m_pBuffer;
I have a function like this
unsigned int WriteData(char *pData,int length);
which takes a chracter array & the no: of bytes to be put into the buffer as parameters.Iam writing into the buffer using the memcpy() function.
The real problem starts now.I have to read data from a list now & write into the buffer using the Writeadata() function.ie: reading the data into the character array declared as parameterin the write function() & calculate the no: of bytes read to put into the 2nd parameter.
If someone can show me how this is done.The rest of the part I can do(Writing into the buffer)
the list is somewhat like this:
for(NgDocData<B>::const_iterator it = ngDocData.m_ngSubDocDataList.begin();
it != ngDocData.m_ngSubDocDataList.end(); it++)
How can I do this?
Please show me with a code snippet
Thanks in advance
I have a buffer char *m_pBuffer;
I have a function like this
unsigned int WriteData(char *pData,int length);
which takes a chracter array & the no: of bytes to be put into the buffer as parameters.Iam writing into the buffer using the memcpy() function.
The real problem starts now.I have to read data from a list now & write into the buffer using the Writeadata() function.ie: reading the data into the character array declared as parameterin the write function() & calculate the no: of bytes read to put into the 2nd parameter.
If someone can show me how this is done.The rest of the part I can do(Writing into the buffer)
the list is somewhat like this:
for(NgDocData<B>::const_iterator it = ngDocData.m_ngSubDocDataList.begin();
it != ngDocData.m_ngSubDocDataList.end(); it++)
How can I do this?
Please show me with a code snippet
Thanks in advance