当前位置:网站首页>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
边栏推荐
- Axure9基本交互操作(一)
- 1319_STM32F103串口BootLoader移植
- 关于std::vector<std::string>的操作
- MySQL查询为啥慢了?
- ROS播包可视化
- Altium Designer 19.1.18 - 保护锁定的对象
- mysql基础
- Red team kill-free development practice of simulated confrontation
- js data type, throttling/anti-shake, click event delegation optimization, transition animation
- ue unreal 虚幻 高分辨率无缩放 编辑器字太小 调整编辑器整体缩放
猜你喜欢

PowerCLi import license to vCenter 7

buu web

2022年江苏省大学生电子设计竞赛(TI杯)B题 飞机 省级一等奖记录 “一个摆烂人的独白”

JWT actively checks whether the Token has expired

Altium Designer 19.1.18 - Protecting Locked Objects

In which industries is the PMP certificate useful?

Altium Designer 19.1.18 - 保护锁定的对象

Flutter 实现背景图片毛玻璃效果

国内的PMP证书含金量到底如何

8 年产品经验,我总结了这些持续高效研发实践经验 · 协同篇
随机推荐
ROS packages visualization
PCBA scheme design - kitchen voice scale chip scheme
AI/ML无线通信
Why is MySQL query slow?
驱动点云格式修改带来的效率提升
如何一键重装win7系统?重装win7系统详细教程
OC-归档(序列化)(了解的不多 没细看)
webmine网页挖矿木马分析与处置
OC-类簇
ue unreal 虚幻 高分辨率无缩放 编辑器字太小 调整编辑器整体缩放
基于 Milvus 和 ResNet50 的图像搜索(部署及应用)
【QT】回调函数的实现
如何将二叉搜索树转化为一个有序的双向链表(原树上修改)
Driving point cloud format changes bring efficiency improvement
Android 面试——如何写一个又好又快的日志库?
mysql基础
如何一键重装Win11系统 一键重装系统方法
C language knowledge (1) - overview of C language, data types
立方度量(Cubic Metric)
Re24:读论文 IOT-Match Explainable Legal Case Matching via Inverse Optimal Transport-based Rationale Ext