随笔分类 -  C

摘要:1 void ErrorRecord(uint32_t Error) 2 { 3 static uint32_t ErrorRecorder = 0; 4 static uint32_t ErrorLast = 0; 5 static uint8_t ErrorCounter = 0; 6 if(( 阅读全文
posted @ 2020-10-22 13:41 aWolfMan 阅读(128) 评论(0) 推荐(0)
摘要:#include #include #include int regenerateID() { return 10; } int read_snmpEngine_file(char* file_name, int* snmpEngineBoots, int* snmpEngineID) { FILE* fp; fp = fopen(file_name, "r")... 阅读全文
posted @ 2017-05-01 22:01 aWolfMan 阅读(836) 评论(0) 推荐(0)
摘要:#include #include #include int file_length(char* fileName) { FILE* fp; int file_set_val,file_end_val; fp = fopen(fileName, "r"); if(fp == NULL) { printf("[%s][%s]r... 阅读全文
posted @ 2017-03-30 23:33 aWolfMan 阅读(1063) 评论(0) 推荐(0)
摘要:#include #include //#include char* file_name_1 = "D:\\testfile.txt"; char* file_name_2 = "D:\\testfile_1.cfg"; char* file_name_3 = "D:\\testfile_flag.txt"; #define ERROR -1 #define OK 0 int file_... 阅读全文
posted @ 2017-03-22 22:37 aWolfMan 阅读(246) 评论(0) 推荐(0)
摘要:有些任务无法用其他语言实现,如直接访问硬件,但C却可以。 C对数组下标引用和指针访问并不进行有效性检查,这可以节省时间,但你在使用这些特性时,就必须特别小心。 阅读全文
posted @ 2016-09-12 00:06 aWolfMan 阅读(133) 评论(0) 推荐(0)