c++
c++的知识点
914406232
这个作者很懒,什么都没留下…
展开
-
DataBase64 加密解密
static const std::string dataChars = "ABCDEPQRSTUVWXYZ""abcdeopqrstuvwxyz""012389+/";static inline bool baseData(unsigned char c) { return (isalnum(c) || (c == '+') || (c == '/'));}std::string DataBase64::EncodeData(const std::string& svalu.原创 2021-09-14 11:50:59 · 648 阅读 · 0 评论 -
socket加解密(c++)
//加密void ByteArray::EncodeMessage( char* buf,size_t size ){ int * bb = (int*) buf; size_t s = size/4; size_t end = s/2; int t = 0; for( size_t i = 0;i < end;i ++ ) { t = bb[i]; bb[i] =...原创 2020-04-29 09:20:44 · 830 阅读 · 0 评论 -
vs中检测内存泄漏的方法
vs中检测内存泄漏的方法使用vs的内存检测有以下几种方法。在debug模式下以F5运行:方法一:[html] view plain copy1. #define CRTDBG_MAP_ALLOC 2. #include 3. #include 4. //在入口函数中包含 _CrtDumpMemoryLeaks(); 5. //即可转载 2017-03-01 11:12:06 · 1601 阅读 · 2 评论 -
DBUtil 对sqlite3的简单封装
/********************************************** * file: DBUtil.h * * date: 2016/09/19 10:36 * * TODO: 对sqlite3的简单封装 * 注意:SQLite3 数据库使用的编码格式为:UTF-8 。如果出现乱码的话,就将其转为 UTF-8 格式!!!!!!!!!! * **********...原创 2018-03-30 15:04:37 · 23354 阅读 · 0 评论 -
C++操作文件行(读取,删除,修改指定行)
/********************************************************文件流操作********************************************************/#include <iostream>#include <fstream>#include <string>us...原创 2019-04-28 18:17:09 · 2284 阅读 · 0 评论 -
c++ 中的sort排序用法
STL中就自带了排序函数sortsort 对给定区间所有元素进行排序 要使用此函数只需用#include <algorithm> sort即可使用,语法描述为:sort(begin,end),表示一个范围,例子:#include <algorithm>int main(){ int a[20]={2,4,1,23,5,76,0,43,24,65},i; for(...原创 2019-05-07 11:58:15 · 442 阅读 · 0 评论 -
[vs插件] bracket pair colorizer
vscode是个好东西,这个插件更是个好东西,嘿嘿,为啥好请看文章:https://zhuanlan.zhihu.com/p/54052970不多说了,自己体会吧!原创 2021-03-01 09:31:44 · 1280 阅读 · 0 评论