C语言
holler kite
菜鸟晋级
展开
-
map::iterator
#include<iostream>#include<map>using namespace std;int main(){ int a[6]; map<int, int>M; a[0] = 5; M[a[0]]++; a[1] = 2; M[a[1]]++; a[2] = 2; M[a[2]]++; a[...原创 2019-07-08 22:13:58 · 1191 阅读 · 0 评论 -
C++ string类的说明
转载自https://www.cnblogs.com/aminxu/p/4686320.html标准C++中的string类的用法总结相信使用过MFC编程的朋友对CString这个类的印象应该非常深刻吧?的确,MFC中的CString类使用起来真的非常的方便好用。但是如果离开了MFC框架,还有没有这样使用起来非常方便的类呢?答案是肯定的。也许有人会说,即使不用MFC框架,也可以想办法使用...转载 2019-06-28 16:23:37 · 122 阅读 · 0 评论 -
ofstream 向文件写数据
#include<fstream>#include<iostream>#include<string>using namespace std;int main(){ fstream out; out.open("rpt1.txt", ios::out|ios::app); //以输入方式打开rpt1.txt 并且定位到文件尾部开始...原创 2019-07-04 14:10:55 · 1080 阅读 · 0 评论 -
C++读取txt数据
#include <iostream>#include <fstream>#include <string>using namespace std;void main(){ char buffer[255]; long double j; int t; string t1, t2; fstream out;...原创 2019-07-01 08:57:16 · 1201 阅读 · 0 评论 -
串口接收数据转换成double型
//检测逗号位置的函数,buf是需要检测的字符串,cx是要检测第几个逗号u8 NMEA_Comma_Pos(u8 *buf,u8 cx){ u8 *p=buf; while(cx) { if(*buf==',')cx--; buf++; if(*buf=='*'||*buf<' '||*buf>'z')return 0XFF;/...原创 2019-08-09 14:15:55 · 1066 阅读 · 0 评论