- 博客(9)
- 资源 (4)
- 问答 (1)
- 收藏
- 关注
原创 问题记录: error while loading shared libraries: libkeyutils.so.1
error while loading shared libraries: libkeyutils.so.1
2022-07-09 23:54:23 303
原创 整型与字符串的互相转换
1.将整型转换成字符串:#define my_maxlen 100void int2str(int num, char* str){ int index = 0, len = 0; char buf[my_maxlen] = ""; if (num < 0) { num = -num; str[index++] = '-'; } while ( num > 0 ) { b
2020-12-19 23:58:22 345 2
原创 C语言字符串常用操作函数的实现
1.strlenint my_strlen(const char* str){ int idx = 0; while ( str[idx] != '\0' ){ idx++; } return idx;}2.strcmpint my_strcmp(const char* s1, const char* s2){ int idx = 0; while ( *s1 == *s2 && *s1 != '\0'
2020-12-13 16:30:48 86
原创 CRC16校验算法
CRC16校验算法/* Table of CRC values for high-order byte */static const unsigned char table_crc_hi[] = { 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x
2020-12-05 10:25:57 490
原创 二进制字符串转十进制数字
unsigned int bin2int (std::string strBin){ unsigned int i = 0; const char *pch = strBin.c_str(); while (*pch == '0' || *pch == '1') { i <<= 1; i |= *pch++ - '0'; } retur...
2018-11-27 17:28:09 7270
原创 计算该天是一年中的第几天
int CaculateCurDays(int nYear, int nMonth, int nDay){ int m[12]={31,28,31,30,31,30,31,31,30,31,30,31}; int i, j = 0; for (i=0;i<nMonth-1;i++) { j+=m[i]; } if ( (nYear%400==0 ||(nYear%4=...
2017-08-24 20:25:45 674
C++用C#封装的COM组件的方式调用SapRfc函数
2018-06-11
怎么判断当前时间是否在设定的时间范围内?
2017-11-03
TA创建的收藏夹 TA关注的收藏夹
TA关注的人