会员
周边
众包
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
明月十茫
博客园
首页
新随笔
联系
订阅
管理
2023年8月21日
c++ 冒泡排序(减少循环次数)
摘要: #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 茫茫明明
阅读(48)
评论(0)
推荐(0)
2019年6月10日
Linux c++ string转其他类型
摘要: #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 茫茫明明
阅读(1493)
评论(0)
推荐(0)
2019年6月5日
linux c++调试日志函数
摘要: #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 茫茫明明
阅读(563)
评论(0)
推荐(0)
2019年4月14日
Linux c++ 转string模板函数,写文件
摘要: #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 茫茫明明
阅读(931)
评论(0)
推荐(0)
Linux shell unzip和tar 批量解压文件
摘要: #!/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 茫茫明明
阅读(1193)
评论(0)
推荐(0)
Linux shell 只删除目录下所有(不知道文件名字)文件,只删除文件夹
摘要: 用法: 删除文件夹 [root@192 Desktop]# ./test.sh d 删除文件 [root@192 Desktop]# ./test.sh f
阅读全文
posted @ 2019-04-14 10:17 茫茫明明
阅读(4561)
评论(1)
推荐(2)
2019年4月10日
linux C++ 读取mysql结果保存
摘要: 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 茫茫明明
阅读(704)
评论(0)
推荐(0)
2019年3月24日
Linux C语言 文件操作
摘要: 打开函数 fopen 的原型如下。 FILE * fopen(char *filename, char *mode); 返回值:打开成功,返回该文件对应的 FILE 类型的指针;打开失败,返回 NULL。 关闭函数 fclose 的原型如下。 int fclose(FILE *fp); // 函数参
阅读全文
posted @ 2019-03-24 13:08 茫茫明明
阅读(1585)
评论(0)
推荐(0)
2019年3月3日
C语言 小技巧函数方法总结
摘要: 1.使用^(异或) 不引入第三变量交换两个变量的值。 2.字符串操作 [root@192 clang]# gcc stringtes.c[root@192 clang]# ./a.outnewname = /root/tmp/as_static
阅读全文
posted @ 2019-03-03 18:31 茫茫明明
阅读(351)
评论(0)
推荐(0)
2019年3月2日
Linux 一些使用工具
摘要: ssh 链接使用工具xshell 下载链接 http://www.onlinedown.net/soft/36383.htm 映射硬盘工具 sftpdriver 安装输入服务器之后链接 并且输入注册码即可
阅读全文
posted @ 2019-03-02 22:08 茫茫明明
阅读(164)
评论(0)
推荐(0)
下一页
公告