//
you're reading...
C++, Source Code, Symbian, Technology

Symbian – TBufC to TBuf conversions

This is the first post in the series of Symbian Descriptors conversions. If you want to learn the basics of String and Descriptors, check out this link.

The first one is TBufC to TBuf Conversion. A TBuf can be obtained from a TBufC using the Des() method of TBufC

Here is a simple code snippet

 _LIT(KTest, "FIRST");
TBufC<16> bufferC(KTest) ;
TBuf<16> buffer(bufferC.Des());

The conversion between TBuf to TBufC is straight forward and can be done using the constructor

TBuf<16> buffer(KTest);
TBufC<16> bufferC(buffer) ;

Advertisements

Discussion

Trackbacks/Pingbacks

  1. Pingback: Symbian – TBuf/TBufC to TPtrC conversions « Tech Desk - September 22, 2009

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: