摘要: #include<iostream> using namespace std; //打印数据 void printAll(int a[], int n) { for(int i = 0; i < n; i++) { cout << " " << a[i]; } cout << endl; } //冒 阅读全文
posted @ 2023-08-21 00:37 茫茫明明 阅读(32) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <sstream> #include <string> using namespace std; template<class T> T fromString(const string &str) { istringstream is(str 阅读全文
posted @ 2019-06-10 16:47 茫茫明明 阅读(1488) 评论(0) 推荐(0) 编辑
摘要: #ifndef MYLOG_H #define MYLOG_H #include #define __DEBUG__ #ifdef __DEBUG__ #define DEBUG(format,...) printf("File: "__FILE__", Line: %d: "format"\n", __LINE__, ##__VA_ARGS__) #define detail(f... 阅读全文
posted @ 2019-06-05 22:09 茫茫明明 阅读(557) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <sstream> using namespace std;//转string模板函数 template <class T> string toString(const T &v) { ostringstream os; os << v; r 阅读全文
posted @ 2019-04-14 10:26 茫茫明明 阅读(927) 评论(0) 推荐(0) 编辑
摘要: #!/bin/sh UNTAR="tar -xvf " #unzip all zip files function unzip_all_file() { for i in *.zip do unzip $i done } #untar all tar.gz files function untar_all_file() { for i in... 阅读全文
posted @ 2019-04-14 10:20 茫茫明明 阅读(1181) 评论(0) 推荐(0) 编辑
摘要: 用法: 删除文件夹 [root@192 Desktop]# ./test.sh d 删除文件 [root@192 Desktop]# ./test.sh f 阅读全文
posted @ 2019-04-14 10:17 茫茫明明 阅读(4542) 评论(1) 推荐(2) 编辑
摘要: c++读取mysql数据库结果保存 #include #include #include #include #include #include #include #include #include using namespace std; //数据库地址密码 string g_Server = "localhost"; string g_User = "root"; ... 阅读全文
posted @ 2019-04-10 22:10 茫茫明明 阅读(684) 评论(0) 推荐(0) 编辑
摘要: 打开函数 fopen 的原型如下。 FILE * fopen(char *filename, char *mode); 返回值:打开成功,返回该文件对应的 FILE 类型的指针;打开失败,返回 NULL。 关闭函数 fclose 的原型如下。 int fclose(FILE *fp); // 函数参 阅读全文
posted @ 2019-03-24 13:08 茫茫明明 阅读(1540) 评论(0) 推荐(0) 编辑
摘要: 1.使用^(异或) 不引入第三变量交换两个变量的值。 2.字符串操作 [root@192 clang]# gcc stringtes.c[root@192 clang]# ./a.outnewname = /root/tmp/as_static 阅读全文
posted @ 2019-03-03 18:31 茫茫明明 阅读(334) 评论(0) 推荐(0) 编辑
摘要: ssh 链接使用工具xshell 下载链接 http://www.onlinedown.net/soft/36383.htm 映射硬盘工具 sftpdriver 安装输入服务器之后链接 并且输入注册码即可 阅读全文
posted @ 2019-03-02 22:08 茫茫明明 阅读(158) 评论(0) 推荐(0) 编辑