跳到主内容
Category

C++

很棒的编程语言

Posts
9
Page
1/1
Tags
53

Posts

分类文章

9 篇 · 当前第 1
C++93 次阅读

CMakefiles.txt基础

makefile cmakeminimumrequired(VERSION 4.0) project(cmake) set(CMAKECXXSTANDARD 20) if (\" ${CMAKESOURCEDIR}\" STREQUAL \" ${CMAKEBINARYDIR}\") MESSAGE

2025/12/161 分钟
C++97 次阅读

c++使用type_identity_t实现泛型自动推导

c++ / 省略写if语句 @tparam ObjectType 指针类型 @param Objc 传入的指针 @param Call 执行有效执行 / template requires std::ispointerv static void Let(ObjectType Objc,

2025/12/161 分钟
C++77 次阅读

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\

2025/12/161 分钟
C++80 次阅读

c++里面的标准库,信号,字符串操作,命名空间,map,set,模板引擎,异常处理,异步future等

cstdlib c++ include include include using namespace std; / 标准库操作 / int main() { //分配指定大小的内存 int ptr = (int)malloc(10 sizeof(int)); cout

2025/12/161 分钟
C++75 次阅读

c++中的字符串操作

中文那里有点坑,需要注意 c++ include include include using namespace std; void printlines(); void printlines() { cout << \"------------\" << endl; } void printstr

2025/12/161 分钟
C++91 次阅读

c++中的 lambda函数

一开始的变量捕获不太懂,写一遍就好理解了 c++ include include include using namespace std; class Test { public: void hello() { cout << \"test hello\" << endl; }

2025/12/161 分钟
C++63 次阅读

c++封装一个Log类

cpp include class Log { public: const int LogLevelError = 0; const int LogLevelWarning = 1; const int LogLevelInfo = 2; private: int mLogLevel = LogLe

2025/12/161 分钟
C++72 次阅读

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

2025/12/161 分钟
C++65 次阅读

C++中使用virtual虚函数

c include class Entity { public: virtual std::string getName() { return \"hello\"; } }; class MyPerson : public Entity { public: std::string getName()

2025/12/161 分钟
返回顶部