摘要:
title: C语言找到下一个2的幂 date: 2020-03-22 17:51:25 详情:https://seekstar.github.io/2020/03/22/c语言取二进制最高位1/ uint32_t next_pow_of_2(uint32_t x) { x = x | (x >> 阅读全文
posted @ 2024-09-28 14:05
寻找繁星
阅读(5)
评论(0)
推荐(0)
摘要:
title: C语言取二进制最高位1 date: 2020-03-22 17:48:34 膜拜mstlq:https://bbs.csdn.net/topics/330068401 //find the Power of 2 that Greater than or Equal to x uint3 阅读全文
posted @ 2024-09-28 14:05
寻找繁星
阅读(50)
评论(0)
推荐(0)
摘要:
title: C语言动态链接库 date: 2020-03-26 21:38:46 详细知识点:https://www.bilibili.com/read/cv269765/?tdsourcetag=s_pctim_aiomsg 使用gcc。 场景 add.c int add(int a, int 阅读全文
posted @ 2024-09-28 14:05
寻找繁星
阅读(27)
评论(0)
推荐(0)
摘要:
title: C语言判断宏参数是否为已定义的宏 date: 2021-11-27 14:50:44 tags: 在宏定义中不能使用#ifdef来判断另一个宏是否被定义。那么怎么实现下面的功能呢? // 为了可读性,把末尾的转义字符省略了。 #define MY_MACRO(flag, var) do 阅读全文
posted @ 2024-09-28 14:05
寻找繁星
阅读(267)
评论(0)
推荐(0)
摘要:
title: C语言内嵌汇编学习笔记 date: 2020-02-27 14:29:22 参考: gnu gcc中关于Extended Asm的文档 https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html Basic Asm文档 https://gc 阅读全文
posted @ 2024-09-28 14:05
寻找繁星
阅读(64)
评论(0)
推荐(0)
摘要:
title: C语言个人学习笔记 date: 2020-03-22 14:32:18 宏 {% post_link C/'C语言判断宏参数是否为已定义的宏' %} 返回值 被({和})包起来的语句中,最后一个语句的值就是整个语句的值。可以用这个特性来构造有返回值的宏。例子: #include <st 阅读全文
posted @ 2024-09-28 14:05
寻找繁星
阅读(13)
评论(0)
推荐(0)
摘要:
title: C语言Makefile自动推导依赖关系 date: 2019-10-24 23:43:23 目录结构: # Works only when there is only one target # You may want to modify it run_debug: debug ./$ 阅读全文
posted @ 2024-09-28 14:05
寻找繁星
阅读(26)
评论(0)
推荐(0)
摘要:
title: CMake find_package兼容add_subdirectory date: 2023-08-25 17:15:50 tags: 如果依赖是通过add_subdirectory添加的,那么find_package的时候会报错找不到xxx-config.cmake。 实际上通过a 阅读全文
posted @ 2024-09-28 14:05
寻找繁星
阅读(37)
评论(0)
推荐(0)
摘要:
title: 把boost::bind的返回值插入到std::unordered_map中 date: 2020-05-03 12:56:26 tags: 只能以insert的形式插入,不能以[]的形式插入。原因不明。 不同的类里的成员函数不能插入同一个unordered_map中。 同一个类里的相 阅读全文
posted @ 2024-09-28 14:05
寻找繁星
阅读(4)
评论(0)
推荐(0)
摘要:
title: 右值引用 date: 2022-10-04 22:19:01 tags: 带名字的右值引用使用的时候会变成左值引用 result type must be constructible from input type #include <iostream> #include <vecto 阅读全文
posted @ 2024-09-28 14:05
寻找繁星
阅读(23)
评论(0)
推荐(0)