当前位置:网站首页>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
边栏推荐
- 多个平台显示IP属地,必须大力推行互联网实名制
- 【分布式】分布式ID生成策略
- Rocketchip RISC-V Debug调试硬件相关(四)hartIsInReset
- 如何一键重装Win11系统 一键重装系统方法
- LocalDate时间日期包的用法
- [Linear Algebra 02] 2 interpretations of AX=b and 5 perspectives of matrix multiplication
- 1319_STM32F103串口BootLoader移植
- In action: 10 ways to implement delayed tasks, with code!
- 基于声卡实现的音频存储示波器,可作为电磁学实验的测量仪表
- [QT] Implementation of callback function
猜你喜欢
DSPE-PEG-Aldehyde, DSPE-PEG-CHO, Phospholipid-Polyethylene Glycol-Aldehyde A hydrophobic 18-carbon phospholipid
buu web
C language knowledge (1) - overview of C language, data types
js data type, throttling/anti-shake, click event delegation optimization, transition animation
docker 部署redis集群
Altium Designer 19.1.18 - Protecting Locked Objects
LeetCode 199: 二叉树的右视图
How to solve the problem that the alarm information cannot be transmitted after EasyGBS is connected to the latest version of Hikvision camera?
基于 Milvus 和 ResNet50 的图像搜索(部署及应用)
论文解读(PPNP)《Predict then Propagate: Graph Neural Networks meet Personalized PageRank》
随机推荐
OC-协议
Develop your own text recognition application with Tesseract
Altium Designer 19.1.18 - 保护锁定的对象
可视化工作流引擎开发OA系统,让企业少花冤枉钱
laravel whereDoesntHave
2022年江苏省大学生电子设计竞赛(TI杯)B题 飞机 省级一等奖记录 “一个摆烂人的独白”
【SQL之降龙十八掌】01——亢龙有悔:入门10题
Altium Designer 19.1.18 - Protecting Locked Objects
七夕特制:《牛郎会织女》
【PCBA program design】Grip dynamometer program
Excel商业智能-Power BI电商数据分析实战
Some problems with passing parameters of meta and params in routing (can be passed but not passed, empty, collocation, click to pass multiple parameters to report an error)
Unknown point cloud structure file conversion requirements
立即升级!WPS Office 出现 0day 高危安全漏洞:可完全接管系统,官方推出紧急更新
硬件开发定制全流程解析
强网杯2022——WEB
Altium Designer 19.1.18 - draw polygons copper hollow out, for the cursor just capture solutions
数电快速入门(一)(BCD码和三种基本逻辑运算的介绍)
LayaBox---TypeScript---structure
Flutter 实现背景图片毛玻璃效果