String array passing by reference

Login to reply to this topic.
Thu, 2005-09-15 06:47
Joined: 2005-05-19
Forum posts: 45
I have a string array ... defined as follows:

typedef TBuf<100> TTextLine;
RArray <TTextLine> iTextLines;   

I want to pass the iTextLines array from one class to another by reference.  Can anybody tell me the correct syntax for doing this?  Is an RArray of TBufs the appropriate choice for this?

Thanks   

"If we knew what it was we were doing, it would not be called research, would it?" - Albert Einstein


Fri, 2005-09-16 08:30
Joined: 2005-09-16
Forum posts: 141
Re: String array passing by reference
Hi,

   to pass the string array by reference, better use RPointerArray<HBufC>.

Use like this,

TBuf<100>itext;
itext.Copy(_L("alsdaf"));
RPointerArray<HBufC>iArray;
iArray.Append(itext.AllocL());

function(iArray);

regards,
eswar
Thu, 2005-09-29 14:52
Joined: 2005-09-28
Forum posts: 7
Re: String array passing by reference


That was a wonderful one........

Please help me display the contents of an RArray....

My RArray is like this......


RArray<HBufC>ifileList;


Thanx in advance

priya
Sat, 2005-11-19 11:30
Joined: 2003-10-10
Forum posts: 124
Re: String array passing by reference
change it to an RArrayPointer. The use the Count() method to loop round each entry.

Use InfoPrint or RDebug::Print () t display it !!
Mon, 2005-12-26 10:19
Joined: 2005-09-16
Forum posts: 141
Re: String array passing by reference
Hi priya,

try this,


RArray<HBufC>ifileList;

ifileList.At(1).Des(), where 1 is index in array, now you print it anywhere

  • Login to reply to this topic.