当前位置:网站首页>Operations on std::vector
Operations on std::vector
2022-08-04 21:50:00 【android framework】
Knowledge points
1 std::vectorstd::string as return parameter
void GetConfigState(std::vectorstd::string&vtTemp)
2 For std::vectorstd::string value operations
std::vectorstd::string::iterator theIterator;
for( theIterator = vtTemp.begin(); theIterator != vtTemp.end(); theIterator++ )
cout 3 Can not directly perform assignment between containers #include } }
#include
using namespace std;
void GetConfigState(std::vectorstd::string&vtTemp)
{
unsigned int nLen = 0;
unsigned int nValue = 0;
std::string strType_Item;
std::string strType_Items;
std::stringstrTemp = "AT+CFUN=1;AT+CFUN=0";
int nPos = strTemp.find(";",0);
int j = 0;
while (nPos != -1)
{
vtTemp.push_back(strTemp.substr(0,nPos));
nPos++;
strTemp = strTemp.substr(nPos,strTemp.length() - nPos);
nPos = strTemp.find(",",0); j++;}if (strTemp.length() != 0){vtTemp.push_back(strTemp.c_str());}
int main()
{std::vector
边栏推荐
- Win11如何设置软件快捷方式?
- In action: 10 ways to implement delayed tasks, with code!
- 七夕特制:《牛郎会织女》
- 【CC3200AI 实验教程 1】疯壳·AI语音人脸识别(会议记录仪/人脸打卡机)-开发环境搭建
- 27. Dimensionality reduction
- 驱动点云格式修改带来的效率提升
- 数电快速入门(一)(BCD码和三种基本逻辑运算的介绍)
- 信创是什么意思?涉及哪些行业?为什么要发展信创?
- [Linear Algebra 02] 2 interpretations of AX=b and 5 perspectives of matrix multiplication
- 看看XDOC如何做Word文档预览
猜你喜欢

DGL安装教程

如何将二叉搜索树转化为一个有序的双向链表(原树上修改)

Rocketchip RISC-V Debug调试硬件相关(四)hartIsInReset

Win11如何设置软件快捷方式?

PowerCLi import license to vCenter 7

docker 搭建mysql 主从复制

如何根据“前序遍历,中序遍历”,“中序遍历,后序遍历”构建按二叉树

y87.第五章 分布式链路追踪系统 -- 分布式链路追踪系统起源(一)

As hot as ever, reborn | ISC2022 HackingClub White Hat Summit was successfully held!

强网杯2022——WEB
随机推荐
【Social Marketing】WhatsApp Business API: Everything You Need to Know
Codeforces Round #811 (Div. 3)
What does Xinchuang mean?Which industries are involved?Why develop Xinchuang?
国际项目管理师PMP证书,值得考嘛?
The upgrade and transformation plan of the fortress machine for medium and large commercial banks!Must see!
关于std::vector<std::string>的操作
openresty lua-resty-template页面静态化
Domestic PMP certificate of gold content how
Win11如何开启Telnet客户端?
# #ifndef/#define/#endif使用详解
OC-拷贝
LayaBox---TypeScript---Example
How to solve the problem that the alarm information cannot be transmitted after EasyGBS is connected to the latest version of Hikvision camera?
com.jacob.com.ComFailException: Invoke of: ActiveDocument
OD-Model [6]: YOLOv2
如何根据“前序遍历,中序遍历”,“中序遍历,后序遍历”构建按二叉树
"Jianzhi offer" brush title classification
Oracle增加表空间解决ORACLE ORA-01653: unable to extend table报错
数电快速入门(五)(编码器的介绍以及通用编码器74LS148和74LS147的介绍)
PyTorch Geometric (PyG) 安装教程