![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
c++
AI PING
这个作者很懒,什么都没留下…
展开
-
普通gpio 换算
简单换算gpio ,其他功能后续扩展#include <stdio.h>#include <iostream>#include <string>using namespace std;std::string calculator(std::string str){ //str.split(); std::size_t p...原创 2019-11-25 22:06:20 · 398 阅读 · 0 评论 -
c++ 字符串类
/// @file StrKit.h/// @brief 声明#StrKit类/// @author Artan/// @date 2019年11月17日/// @version 1.0.0.1#ifndef _STRKIT_H#define _STRKIT_H/// @brief 字符串工具包class StrKit {public: /// @brief 字符串拼...原创 2019-11-17 09:40:32 · 98 阅读 · 0 评论 -
C++ 线程类封装
#ifndef _THREAD_H#define _THREAD_H/// @brief 线程class Thread {public: /// @brief 析构器 virtual ~Thread (void) {} /// @brief 启动线程 void start (void);private: /// @brief 线程过程函数...原创 2019-11-17 09:26:01 · 576 阅读 · 0 评论 -
c++ 实现switch 字符串
#include <map>#include <string>#include <iostream>using namespace std;const int _MAX_PATH=100;// Value-Defintions of the different String valuesenum StringValue { evNotDefined...原创 2019-01-07 10:03:03 · 3152 阅读 · 0 评论 -
UTF8转UINCODE
#include <stdio.h>#include <string.h>#define uint16 unsigned short#define uint8 unsigned char#define UINT16 unsigned short#define UINT8 unsigned char#define int16 shortstatic i...原创 2018-07-18 17:07:33 · 126 阅读 · 0 评论 -
printf("%x") 输出 0xFFFFFFFF81
#include <stdio.h>int main(){ char a = 0x81; printf("0x%x\n",a); // 0x81 在内存中存储为 1000 0001 这是个补码 ,变量a为有符号数 所以反码为 1000 0000 则源码为 1111 1111 这个数为 -127 // -127 在32位...原创 2019-02-27 10:34:53 · 1664 阅读 · 0 评论 -
c++ 局部类
我们称定义在在某个函数内部的类为局部类。局部类定义的类型只在定义它的作用域内可见。和嵌套类不同,局部类的成员受到严格的限制。 注意:局部类的所有成员(包括函数在内)都必须完整定义在类的内部。因此,局部类的作用与嵌套类相比很不一样。如下面这个例子:int a,val;void function(int val){ static int mValue;...原创 2019-08-11 23:31:00 · 177 阅读 · 0 评论