随笔分类 -  C语言

一个使用Win32api的简单乐谱解析器
摘要:音调数据 enum scale { Rest = 0 , A0 = 21 , A0s = 22 , B0 = 23 , C1 = 24 , C1s = 25 , D1 = 26 , D1s = 27 , E1 = 28 , F1 = 29 , F1s = 30 , G1 = 31 , G1s = 3 阅读全文

posted @ 2023-01-14 11:49 acd407 阅读(53) 评论(0) 推荐(0)

Mandelbrot Set Visualization
摘要:Bit Draw Solution 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <string.h> 4 #include <math.h> 5 #include <complex.h> 6 #include <stdbool.h> 7 阅读全文

posted @ 2022-08-25 23:33 acd407 阅读(36) 评论(0) 推荐(0)

Color Map
摘要:Source 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <string.h> 4 #include <math.h> 5 6 #define XLEN 1024 7 #define YLEN 1024 8 9 int main() 1 阅读全文

posted @ 2022-08-25 10:35 acd407 阅读(19) 评论(0) 推荐(0)

Logistic Map
摘要:Source Link 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <math.h> 4 5 #define X 2560 //尽量为8的倍数,若不是X/8需向上取整 6 #define Y 1600 //推荐X、Y比例为(4.0-2. 阅读全文

posted @ 2022-08-21 12:56 acd407 阅读(107) 评论(0) 推荐(0)

function plotter
摘要:1 #include <stdio.h> 2 #include <math.h> 3 #include <stdlib.h> 4 #include <stdbool.h> 5 #define max(x, y) ((x)>(y)?(x):(y)) 6 7 #define XDIM 1024 //此项 阅读全文

posted @ 2022-08-17 17:57 acd407 阅读(492) 评论(0) 推荐(0)

gcc或clang的部分builtin函数
摘要:1 __builtin_ctz(x); // 求x的二进制数末尾0的个数 2 __builtin_ctz(0b0100) //2 3 4 __builtin_clz(x); // 求x的二进制数前导0的个数(ps:一共有32位) 5 __builtin_clz(0b0100) //29 6 7 __ 阅读全文

posted @ 2022-01-21 21:17 acd407 阅读(267) 评论(0) 推荐(0)

CMD的控制字符输出
摘要:CMD的控制字符输出 1 #include<stdio.h> 2 int main() 3 { 4 int i; 5 for(i=0;i<256;i++) 6 printf("%d:%c\t",i,i); 7 return 0;; 8 } 输出 阅读全文

posted @ 2021-06-18 09:00 acd407 阅读(422) 评论(1) 推荐(0)

导航