![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++
Ideal丶
好好学编程~~~
展开
-
运用GDAL对图像进行二值化
#include"pch.h"#include<stdio.h>#include<gdal_priv.h>#include<iostream>usingnamespacestd; constintthreshold=5000;int main(){constchar*pInFile="C:\\Users\\li_...原创 2019-11-13 19:01:23 · 1052 阅读 · 0 评论 -
赤纬转换为度 (字符切割和字符类型转换 string→double)
double dectod(string a) //赤纬转化为度{string a=" 32d30 -29d55";string b=a.substr(0.1);if(b=="-"){string c=a.substr(1,2);double c1=atof(c.c_str());string d=a.substr(5,2);double d1=atof(d.原创 2017-08-11 14:33:03 · 629 阅读 · 0 评论 -
使用迭代器遍历输出vector数组
c++中的vector元素需要用迭代器iterator来循环获取。例子如下:#include<stdio.h>#include<vector>#include <iostream>using namespace std;void main(){int i = 0;std::vector<int> vor;for(i = 0;i<10;i++){...原创 2018-06-13 14:24:05 · 8770 阅读 · 0 评论 -
(转载)C++ ofstream和ifstream详细用法
原文出自【比特网】,转载请保留原文链接:http://soft.chinabyte.com/database/460/11433960.sh[导读] ofstream是从内存到硬盘,ifstream是从硬盘到内存,其实所谓的流缓冲就是内存空间 在C++中,有一个stream这个类,所有的I/O都以这个“流”类为基础的,包括我们要认识的文件I/O. stream这...转载 2018-07-25 09:25:34 · 193 阅读 · 0 评论