Google 网上论坛不再支持新的 Usenet 帖子或订阅项。历史内容仍可供查看。

re PCSZ and new

已查看 1 次
跳至第一个未读帖子

Adrian Suri

未读,
2007年3月20日 15:17:222007/3/20
收件人
Hi

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

Regards

Adrian Suri

Paul Ratcliffe

未读,
2007年3月20日 19:54:442007/3/20
收件人
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

未读,
2007年3月21日 02:07:002007/3/21
收件人

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

未读,
2007年3月21日 05:07:362007/3/21
收件人
Hi Will Honea ...

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


adrian

Adrian Suri

未读,
2007年3月21日 06:16:522007/3/21
收件人
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 个新帖子