博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
演示使用string对象
阅读量:4680 次
发布时间:2019-06-09

本文共 496 字,大约阅读时间需要 1 分钟。

#include
#include
using namespace std;void main(){ string str1("i am here!"); string str2="where are you?"; cout << str1[0] << str1[9] << "," << str1 << endl; cout << str2[0] << str2[13] << "," << str2 << endl; cout << "please input you name:"; cin >> str1; cout << str1 << endl; cout << "length of the name is :" << str1.size() << endl; cout << str2 + " " + str1 << endl;}

输出结果

 

end!

转载于:https://www.cnblogs.com/changbo/p/5267762.html

你可能感兴趣的文章
Dubbo-Fail to decode request due to: RpcInvocation
查看>>
android笔记5——同一个Activity中Fragment的切换
查看>>
Pillow & OpenCV安装
查看>>
【3dsmax2016】安装图文教程、破解注册以及切换语言方法
查看>>
markdown
查看>>
WebService-01-使用jdk发布第一个WebService服务并调用
查看>>
mysql 关键字于数据库字段于关键字冲突的问题
查看>>
【bzoj2694】Lcm 莫比乌斯反演+线性筛
查看>>
【bzoj3110】[Zjoi2013]K大数查询 整体二分+树状数组区间修改
查看>>
Django表查询补充
查看>>
阅读计划
查看>>
Windows Live Writer 代码插件测试
查看>>
边工作边刷题:70天一遍leetcode: day 32-1
查看>>
BZOJ4725: [POI2017]Reprezentacje ró?nicowe
查看>>
Sql查询语句过滤重复的数据
查看>>
mac 上iterm终端连接Linux服务后 中文为乱码问题
查看>>
MyBatis 【增删改查】
查看>>
重新编译jdk,使其带有调试信息
查看>>
python-map的用法
查看>>
添加一条公告并标记为已读
查看>>