全局变量统一在一个文件:两种方法(头文件与源文件)
摘要:若全局变量统一在一个文件里,有两种方法: 统一在头文件 文件名:VariablesDefiniation.h #ifndef a #define a int a; int b; ··· #endif 文件名:VariablesDeclearation.h #ifndef b #define b ex
阅读全文
posted @
2021-03-24 09:05
clayyjh
阅读(298)
推荐(0) 编辑
C语言 动态内存
摘要:数据类型 int int* double double* char char* 字节大小 4 4 8 4 1 4 #include <stdio.h> #include <stdlib.h> int main() { //一维 int double char 相同 int n = 10; int *
阅读全文
posted @
2021-03-23 17:31
clayyjh
阅读(18)
推荐(0) 编辑
cp
摘要:复制文件到指定目录 cp a.c b.c(当前目录) cp a.c ~/c(另外目录) 复制目录到指定目录下 cp ./src ~/c
阅读全文
posted @
2021-03-13 22:40
clayyjh
阅读(28)
推荐(0) 编辑
Linux环境下编写C语言工程
摘要:1. 单个或者较少源文件的编译 gcc -o test test.c gcc -o test test.c test1.c 参考文档: a. https://man7.org/linux/man-pages/man1/gcc.1.html b. https://colobu.com/2018/08/
阅读全文
posted @
2021-03-13 22:17
clayyjh
阅读(541)
推荐(0) 编辑
查看同一局域网下其他设备ip
摘要:下载地址:https://www.nirsoft.net/utils/wireless_network_watcher.html
阅读全文
posted @
2021-03-12 22:23
clayyjh
阅读(1213)
推荐(0) 编辑
C语言 记录程序的执行时间
摘要:新增chrono计算耗时 #include <iostream> #include <chrono> #include <unistd.h> using namespace std; // 测量 C++ 程序运行时间的主函数 // 使用 Chrono 库 int main() { auto star
阅读全文
posted @
2021-03-12 22:04
clayyjh
阅读(2355)
推荐(1) 编辑
raspberry3 install torch1.7.0 python3.7 whl
摘要:1. download torch1.7.0 whl:https://github.com/ljk53/pytorch-rpi/blob/master/torch-1.7.0a0-cp37-cp37m-linux_armv7l.whl 2. upload the whl to the raspber
阅读全文
posted @
2021-03-08 21:03
clayyjh
阅读(277)
推荐(0) 编辑
Numpy import error Python3 on Raspberry Pi?
摘要:教程:https://stackoverflow.com/questions/53784520/numpy-import-error-python3-on-raspberry-pi
阅读全文
posted @
2021-03-08 18:21
clayyjh
阅读(62)
推荐(0) 编辑
树莓派安装torch1.3.0 python3.7 armv71
摘要:1. 树莓派终端输入 uname -a 确认自己的版本为armv71版本 2. 树莓派终端输入 python3 确认自己的python版本为python3.7 3. 执行安装命令 pip3 install https://wintics-opensource.s3.eu-west-3.amazona
阅读全文
posted @
2021-03-08 17:33
clayyjh
阅读(1133)
推荐(0) 编辑
sscanf 用法
摘要:请查看:https://www.cnblogs.com/polebug/archive/2014/01/02/3502565.html
阅读全文
posted @
2021-03-06 09:11
clayyjh
阅读(25)
推荐(0) 编辑
C语言 scanf printf sscanf sprintf 函数
摘要:1. scanf int a; scanf("%d",&a); 2. printf int a=5; printf("%d",a); 3. sscanf char *str="123-12-3"; int a,b,c; sscanf(str,"%d-%d-%d",a,b,c); 4. sprintf
阅读全文
posted @
2021-03-05 20:20
clayyjh
阅读(65)
推荐(0) 编辑