摘要:
包括: char , int , float, double, long ,long long , unsigned long long , long double 1、源码 #include <iostream> using namespace std; class empty_class {}; 阅读全文
摘要:
已经通过初步测试 下面的是传统常见数据类型的转换(非c++11) std::string 与其他常用类型相互转换, CString 与其他常见类型相互转换, 包括: int, char*, float, double, long。 自己写个类,方便调用, 包括: MFC A、int 转 CStrin 阅读全文
摘要:
欢迎指正 本文主要涉及 Visiual Studio(简称VS) 创建的c++项目 和 windows下批处理相关点。 1、中间项 A、VS创建的c++项目,生成后,会有许多中间项,包括项目生成的中间项 和 解决方案的中间项, 下次打开解决方案,显示的是上一次关闭的位置,VS则是通过配置实现的。 这 阅读全文
摘要:
一个例子,自定义exception 继承std::exception 1 class _oct_udp_api_export_ udp_err : public std::exception 2 { 3 public: 4 explicit udp_err(std::string str_err); 阅读全文
摘要:
判断操作系统 IF (CMAKE_SYSTEM_NAME MATCHES "Linux") ELSEIF (CMAKE_SYSTEM_NAME MATCHES "Windows") ELSEIF (CMAKE_SYSTEM_NAME MATCHES "FreeBSD") ELSE () MESSAG 阅读全文
摘要:
1 #include <iostream> 2 #include <sys/epoll.h> 3 #include <fcntl.h> 4 #include <thread> 5 #include <chrono> 6 #include <pthread.h> 7 #include <sys/soc 阅读全文
摘要:
fedora 1、比如,我要用clang 命令编译代码,但是没有该指令。比如: clang main.cxx -o main 2、那么,输入未知命令,希望fedora会自动寻找相对应的包,再并提示安装,当安装完成后,可以自动执行此命令。 3、你需要一个包: PackageKit-command-no 阅读全文
摘要:
仓库地址 gitee github 特点 支持IPV4 和 ipv6 支持UDP 组播、单播、 广播 使用流程 初始化 发送 | 接收 退出 一个范例 例子可在example目录下main.cc中找到 1. 创建 pudp = lib_commu::NewUDP(); 2.1 初始化 UDPInit 阅读全文
摘要:
欢迎指正 CMake : A、download : https://cmake.org/download/ B、tutorial: https://cmake.org/cmake-tutorial/ 说明: 我目前使用的是最新版:3.18 。 0、序言 A、Cmake可配置生成项目 B、项目可以是库 阅读全文
摘要:
1、头文件 1 #include <arpe/inet.h> 2、inet_pton 函数 A、原型 1 int inet_pton(int family, const char *strptr, void *addrptr); B、功能 : 将点分十进制的ip地址转化为用于网络传输的数值格式 C、 阅读全文