How to Copy the values of a "CDesCArrayFlat" type array in a Tbuffer.

Login to reply to this topic.
Tue, 2007-08-07 10:23
Joined: 2007-07-05
Forum posts: 11

Hi

I am new in symbian and i want to copy a array into a buffer one by one but i di'nt so please help me.

Thanks


Wed, 2007-08-08 10:37
Joined: 2006-04-19
Forum posts: 134
Re: How to Copy the values of a "CDesCArrayFlat" type array in

Hi

CDesCArray* array = new(ELeave) CDesCArrayFlat(2);

TBuf<40> test;
//One way
test.Copy( (*array)[i] ) ;

// 2nd way

test.Copy( array->MdcaPoint(i) );

From my point of view first is better.

BR
Isha


"To the question of your life , you are the only Answer. To the problems of your life,you are the only Solution".

Wed, 2007-08-08 17:10
Joined: 2004-07-10
Forum posts: 364
Re: How to Copy the values of a "CDesCArrayFlat" type

I assume you want to copy all of the items in the array to the buffer, in which case calling Copy() in a loop will overwrite the previous contents, so call Append() in a loop

  • Login to reply to this topic.