Amethyst Studio
C语言根据宏参数个数不同采取不同动作
2023-03-11
有的时候我们希望当宏参数不同时,C语言能够采取不同的动作,例如只有一个参数时,扩展成一个if,当有两个参数时,扩展成一个if和一个else if。实际上使用一些技巧完全可以让C宏做到这件事。
343 words
|
2 minutes
Cover Image of the Post
现代C++实践技巧 - 打印枚举变量名
2023-03-08
使用硬编码来打印变量名可能会非常麻烦,这里有一个比较方便的方法。
710 words
|
4 minutes
Cover Image of the Post
ink!实现一个简单的智能合约
用ink!实现一个简单的智能合约,部署到波卡生态网络上
1221 words
|
6 minutes
Cover Image of the Post
聪明人的个人成长(摘抄)
第一章,真实。要成长,首先要接受现实,要知道真实情况是什么
3115 words
|
16 minutes
Cover Image of the Post
在C++中编写Cached函数
2023-02-18
python里面有一个超好用的cache关键字,可以用来提升性能,C++虽然没有这样的东西,但是我们可以来自己实现
714 words
|
4 minutes
Cover Image of the Post
C++为什么析构函数是虚函数
2022-11-12
解释一下为什么析构函数经常是虚函数
414 words
|
2 minutes
Cover Image of the Post
变优秀有用吗
变得优秀,就会受到追捧吗?
327 words
|
2 minutes
Cover Image of the Post
指令调度
由于芯片底层流水线的设计,按序执行指令可能并非是性能最优的方案,适当调整指令执行的顺序会使得程序的运行效率提高,这就是编译优化的指令调度。
3053 words
|
15 minutes
Cover Image of the Post