How to create a tab or array of TDesC objects?
I want to store all the path name of files that I found in a directory using TFindFile::FindWildByDir().
Using TParse::FullName(), I can get a TDesC cointaining the file path.
I simply tried that:
TDesC* pArray = new TDesC[iNbFiles];
But the compiler does not agree...
What can I use to store those TDesC objects to be able to extract the file pathname after?
Thanks in advance,
RE: How to create a tab or array of TDesC objects?
Why not you use like this?
CArrayPtrFlat<TDesC> *pArray = new(ELeave)CArrayPtrFlat<TDesC>(iNbFiles);
for(int i=0; i<iNbFiles; i++)
Then you can get the path just like this:
TDesC *path = pArray->At(i);
Hope this can help you.
Any questions more, Please let me know.