字符串的地址 [英] Address of a string

查看:90
本文介绍了字符串的地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

字符串类是否有一个方法来检索

字符串的地址?


谢谢。

Does the string class have a method for retrieving the address of a
string?

Thanks.

推荐答案

ruffiano写道:
ruffiano wrote:

字符串类是否有检索

字符串?
Does the string class have a method for retrieving the address of a
string?



你的意思是std :: string :: data()和sd :: string :: c_str()?


他们可能没做你想的......


-

Phlip
http://c2.com/cgi/wiki?ZeekLand < - 不是博客!!!

You mean std::string::data() and sd::string::c_str()?

They might not do what you think...

--
Phlip
http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!!!


ruffiano写道:
ruffiano wrote:

字符串类是否有一个方法来检索

字符串的地址?
Does the string class have a method for retrieving the address of a
string?



哪个字符串和地址是什么字符串?对于''std :: string''请RTFM,

它有c_str和数据成员,你可能会发现它们很有用。


V

-

请在通过电子邮件回复时删除资金''A'

我没有回应top-发表回复,请不要问

Which string and address of what string? For ''std::string'' please RTFM,
it has ''c_str'' and ''data'' members you might find useful.

V
--
Please remove capital ''A''s when replying by e-mail
I do not respond to top-posted replies, please don''t ask


您好,我试图将这个字符串与memcpy一起使用。


// void * memcpy(void * dest,const void * src,size_t count);


再次感谢您的快速解答。这非常棒。


ruffiano写道:
Hi, I was trying to use the string with memcpy.

// void *memcpy( void *dest, const void *src, size_t count );

Thanks again for the quick answers. This ng is really great.

ruffiano wrote:

字符串类是否有一个方法来检索一个地址

string?


谢谢。
Does the string class have a method for retrieving the address of a
string?

Thanks.


这篇关于字符串的地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆