社区
C语言
帖子详情
What's the difference between String::size_type and int ?
gaowudi
2003-04-20 08:37:25
Thanks a lot.
...全文
68
6
打赏
收藏
What's the difference between String::size_type and int ?
Thanks a lot.
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
6 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
fullsail
2003-04-27
打赏
举报
回复
String::size_type ?
你说的是MFC的CString还是std::string.
如果是前者就是unsigned int,
如果是后者,他是一个类型,根据不同编译器的实现,有不同的实作版本,就看你的编译器是如果实现STL,你大部分使用的应该是size_t
linchwu
2003-04-20
打赏
举报
回复
up
string::npos 到底指的哪儿?
point_to
2003-04-20
打赏
举报
回复
辛苦了!!
lifanxi
2003-04-20
打赏
举报
回复
string里的size_type是这样来的:
typedef _A::size_type size_type;
_A::size_type是这样来的:
typedef _SIZT size_type;
_SIZT是这样来的
#define _SIZT size_t
size_t是这样来的:
typedef unsigned int size_t;
以上是在VC6中找到结果。
point_to
2003-04-20
打赏
举报
回复
The unsigned integer type describes an object that can represent the length of any controlled sequence. It is described here as a synonym for the unspecified type T0 (typically A::size_type).
String::size_type 有这个么?if,表示长度,是类string的一个成员
而int是一种类型!
lifanxi
2003-04-20
打赏
举报
回复
如果你在VC中最根溯源的话,你会发现size_type就是unsigend int
是一系列typedef的结果。
微服务系列第七十一季-Spring入门
What can Spring do 3、What You Will Build 4、What You Need 5、How to complete this guide 6、Starting with Spring Initialize 7、Create a Resource Representation Class 8、Create a Resource Controller 9...
C++
String
: What is the
difference
between '\n' and '\r\n'?
C++
String
: What is the
difference
between '\n' and '\r\n'? Q: What is the
difference
between '\n' and '\r\n'? A: Background There are a few characters which can indicate a new line. T
Your program reads two time spots and pr
int
s the time
difference
between them hours and minutes.
What is the time
difference
between 10:30 and 11:45? Your program reads two time spots and pr
int
s the time
difference
between them, in terms of hours and minutes. Input Format Two time spots, in 24-...
C++11中std::packaged_task的使用
// reference: https://stackoverflow.com/questions/18143661/what-is-the-
difference
-between-packaged-task-and-async
int
test_packaged_task_4() { // sleeps for one second and returns 1 auto sleep = []...
the
difference
between : cbegin(cend) and begin(end)
cbegin(cend): Return const_iterator to beginning Returns a const_iterator po
int
ing to the first element in the container. A const_iterator is an iterator that po
int
s to const content. This iter
C语言
69,369
社区成员
243,082
社区内容
发帖
与我相关
我的任务
C语言
C语言相关问题讨论
复制链接
扫一扫
分享
社区描述
C语言相关问题讨论
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章