随笔分类 -  C/C++

摘要:测试程序 #include <stdio.h> void func() { char* p = NULL; p[0] = 'A'; } int main() { func(); printf("Hello world!"); return 0; } 编译, 生成可执行程序 gcc -g main.c 阅读全文
posted @ 2022-10-02 17:31 暹罗吹雪 阅读(74) 评论(0) 推荐(0)
摘要:c语言相关函数 #include <stdio.h> #include <time.h> void time_test_func() { time_t seconds; seconds = time(NULL); printf("从1970-01-01 00:00:00到现在的秒数: [%ld]\n 阅读全文
posted @ 2022-10-02 16:58 暹罗吹雪 阅读(74) 评论(0) 推荐(0)