- Posts
- 9
- Page
- 1/1
- Tags
- 53
Posts
分类文章
CMakefiles.txt基础
makefile cmakeminimumrequired(VERSION 4.0) project(cmake) set(CMAKECXXSTANDARD 20) if (\" ${CMAKESOURCEDIR}\" STREQUAL \" ${CMAKEBINARYDIR}\") MESSAGE
c++使用type_identity_t实现泛型自动推导
c++ / 省略写if语句 @tparam ObjectType 指针类型 @param Objc 传入的指针 @param Call 执行有效执行 / template requires std::ispointerv static void Let(ObjectType Objc,
c++基础之cassert,cfloat,climits,codecvt,cwchar,local,memory,new,random
cassert - 断言 c++ include include / 断言 false: 程序中止,程序中止执行 / int main() { int a = 7; int b = 2; assert(a b);// true:继续正常执行 std::cout << \"a需要大于b\
c++里面的标准库,信号,字符串操作,命名空间,map,set,模板引擎,异常处理,异步future等
cstdlib c++ include include include using namespace std; / 标准库操作 / int main() { //分配指定大小的内存 int ptr = (int)malloc(10 sizeof(int)); cout
c++中的字符串操作
中文那里有点坑,需要注意 c++ include include include using namespace std; void printlines(); void printlines() { cout << \"------------\" << endl; } void printstr
c++中的 lambda函数
一开始的变量捕获不太懂,写一遍就好理解了 c++ include include include using namespace std; class Test { public: void hello() { cout << \"test hello\" << endl; }
c++封装一个Log类
cpp include class Log { public: const int LogLevelError = 0; const int LogLevelWarning = 1; const int LogLevelInfo = 2; private: int mLogLevel = LogLe
C++使用vector,以及优化技巧
基本使用 c++ include include include // // Created by ldd on 2024/1/28. // struct Vertex { float x,y,z; }; std::ostream& operator<<(std::ostream& stream,c
C++中使用virtual虚函数
c include class Entity { public: virtual std::string getName() { return \"hello\"; } }; class MyPerson : public Entity { public: std::string getName()