Saturday, May 14, 2005

16. What does TPtrC::Set() do?

Set() may be called on a constant or modifiable pointer descriptor to change what it points to, that is, to set it to reference different string data.

For example:

_LIT(KFred, "Fred");
_LIT(KBert, "Bert");
TPtrC fred(KFred); // contains 'Fred'
TPtrC bert(KBert); // contains 'Bert'
bert.Set(fred); // bert now contains 'Fred'

This page is powered by Blogger. Isn't yours?

WWW Descriptors FAQ