Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Mar 2003

    How to create a tab or array of TDesC objects?

    Hi Folks,

    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,

  2. #2
    Regular Contributor
    Join Date
    Mar 2003

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts