- 博客(5)
- 收藏
- 关注
转载 c++ 路径转义
电脑硬盘E盘下,建文件夹“test”,"test"下建立子文件夹“file”,"file"下建子文件夹“data”,电脑资源管理器显示目录 E:\test\file\data当前 路径 E:\test\file===================================================1. 相对路径 ,用正斜杠’/‘ 1.1向上一级目录指向...
2018-07-24 09:24:58 2881
原创 VS2010 配置OpenGL环境 及 Release编译环境
创建一个OpenGL窗口#include <Windows.h>#include <stdio.h>#include <tchar.h>#include "gl3w.h"#include "glfw3.h"#pragma comment(lib,"glfw3.lib")static void error_callback(int error,..
2018-07-23 18:20:19 662 1
转载 C++ string,删除字符串中的首尾空格
void EraseSpace(string &s) { //ch可换成其他字符 const char ch = ' '; s.erase(s.find_last_not_of(" ") + 1); s.erase(0, s.find_first_not_of(" ")); }
2018-07-20 10:47:28 881
转载 c++ 实现字符串中替换字符串,也可去掉字符串中特定字符串
int string_replase(string &s1, const string &s2, const string &s3){ string::size_type pos = 0; string::size_type a = s2.size(); string::size_type b = s3.size(); while ((pos = s1.find...
2018-07-20 10:42:57 6240
转载 C++从string中删除所有的某个特定字符
#include <string> #include <iostream> using namespace std; string& replace_all(string& str,const string& old_value,const string& new_value) ...
2018-07-20 10:40:53 5152
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人