Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

re PCSZ and new

1 view
Skip to first unread message

Adrian Suri

unread,
Mar 20, 2007, 3:17:22 PM3/20/07
to
Hi

Can anyone give me an example of creating a PCSZ string dynamically
using new, or is this possible

Regards

Adrian Suri

Paul Ratcliffe

unread,
Mar 20, 2007, 7:54:44 PM3/20/07
to
On Tue, 20 Mar 2007 19:17:22 GMT, Adrian Suri
<adrian.su...@irusdev.co.uk> wrote:

> Can anyone give me an example of creating a PCSZ string dynamically
> using new, or is this possible

It makes no sense to allocate storage which you cannot write to, so I don't
see the point. What are you trying to do?

Will Honea

unread,
Mar 21, 2007, 2:07:00 AM3/21/07
to

Only use I see for it is to protect the data when passing it from class
to class in OO code - I use it frequently there just to forestall fat
finger problems. It also reduces code size by a minuscule amount as it
allows a true reference passing without replication.

--
Will Honea <who...@yahoo.com>

Adrian Suri

unread,
Mar 21, 2007, 5:07:36 AM3/21/07
to
Hi Will Honea ...

Van you possibly show how you initialise this... have you any sample code..


adrian

Adrian Suri

unread,
Mar 21, 2007, 6:16:52 AM3/21/07
to
Hi again

I had assumed, I might be wrong that if you can create
a PCSZ on the fly one can produce a pointer to a variable, initialised
at run time, and not compile time. In other words without having to use
too much memory, as one can using an array of char

Adrian

0 new messages