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,
Seb.
RE: How to create a tab or array of TDesC objects?
1970-01-01, 02:00#2
Why not you use like this?
CArrayPtrFlat<TDesC> *pArray = new(ELeave)CArrayPtrFlat<TDesC>(iNbFiles);
for(int i=0; i<iNbFiles; i++)
{
pArray->AppendL(Pathi);
}
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.
THX^_^