I have problem in copying the data to a array variable which is read from a file..
Can any one plz help me..
Here is the code which i'm using to read the data from a file..
Expand|Select|Wrap|Line Numbers
- RFs fs;
- User::LeaveIfError(fs.Connect());
- CleanupClosePushL(fs);
- RFile file;
- TInt Err1=file.Open(fs,aFilename,EFileRead);
- if(Err1==KErrNone)
- {
- TInt Size;
- file.Size(Size);
- HBufC8* buffer = HBufC8::NewLC(Size);
- TPtr8 ptr= buffer->Des();
- file.Read(ptr);
- file.Close();
- CleanupStack::PopAndDestroy(buffer);
- }
- fs.Close();
- CleanupStack::PopAndDestroy(&fs);
Expand|Select|Wrap|Line Numbers
- CDesCArray* PlaylistSongs = new (ELeave) CDesCArrayFlat(3);
Regards,
Mounika MV