demo
megeeT
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
北京时间转秒值(mktime)
#include <iostream>#include <cstring>#include <ctime>using namespace std;struct data{ int year = 2021-1900; int month = 10-1; int date = 18; int hour = 15; int min = 30; int sec = 30;}beijing_time;time_t GetTimeNo...原创 2021-10-18 16:30:01 · 363 阅读 · 0 评论 -
C/C++16进制字符文件转2进制数据文件
#include <iostream>#include <cstdlib>using namespace std;int file_size(FILE* fp){ fseek(fp, 0L, SEEK_END); return ftell(fp);}int main(){ unsigned char buff; unsigned char rslt; unsigned char temp = 0; int is_upper = 1; .原创 2021-09-15 17:29:19 · 483 阅读 · 0 评论 -
C语言实现FIFO
#include "stdio.h"#include "stdlib.h"#include "string.h"#include "stdint.h"#include "stdbool.h"typedef struct { uint8_t* data; uint32_t isize; uint32_t isum; uint32_t wpos; uint32_t rpos; bool is_full;} fifo_t;int fifo_create(uint32_t.原创 2021-09-02 15:48:03 · 733 阅读 · 0 评论 -
将UTC时间转换为北京时间(字符数组转换为整型)
#include <stdio.h>#include <stdlib.h>#define subtime 8struct time{ int year; int month; int date; int hour; int min; int sec; };struct time...原创 2021-08-19 16:02:33 · 653 阅读 · 0 评论 -
按逗号提取GPS数据中的UTC时间
#include <stdio.h>#include <string.h>#include <stdlib.h>#define len 20char BDS_year[3];char BDS_month[3];char BDS_date[3];char BDS_hour[3];char BDS_min[3];char BDS_sec[3];char* p[len];int i;char uart3[60]={'$','G','N','R',.原创 2021-08-19 15:59:46 · 281 阅读 · 0 评论
分享