C语言开发
C语言
雨中来客
let dream become true.
展开
-
C语言计算程序段执行时长
程序段: #include <stdio.h> #include <sys/time.h> int main(int argc,char * argv[]){ int us = 0; struct timeval start, end; gettimeofday(&start, NULL); usleep(1000*1000+234*1000); gettimeofday(&end, NULL); if(end.t原创 2020-05-20 23:11:31 · 378 阅读 · 0 评论 -
C语言预预处理命令
1, #typedef 定义类型别名 2, #define PI(形参表) 3.14 定义一个表示符和一个字符串 3, #undef PI 终止宏定义的作用域 4, #include 包含一个源代码 5, #if 如果给定条件为真,则编译下面代码 6, #ifdef 如果宏已经定义,则编译下面代码 7, #ifndef 如果宏没有定义,则编译下面代码原创 2015-08-18 16:15:17 · 342 阅读 · 0 评论