2022年8月2日
摘要: 通过类的一个实例来获取类的虚函数地址 环境:Ubuntu + GCC 代码: test.h #ifndef _TEST_H_ #define _TEST_H_ #include <iostream> class Single { public: int a; int b; }; class Basi 阅读全文
posted @ 2022-08-02 19:12 林西索 阅读(281) 评论(2) 推荐(0) 编辑
  2022年3月23日
摘要: 转载:https://blog.codingnow.com/2006/11/windows_unix_dynamic_library.html 最近慢慢将开发环境转向了 freebsd ,渐渐的发现了许多东西跟 Windows 下不太一样。我指的是,跟我以前想当然的理解不太一样。比如,unix 下对 阅读全文
posted @ 2022-03-23 10:53 林西索 阅读(181) 评论(0) 推荐(0) 编辑
  2022年3月16日
摘要: 原文地址https://www.cnblogs.com/bookdrip/p/9987099.html 一、wchar_t和char的基础知识 1.C程序中使用的char类型,是占用一个字节,一共可以表示256个字符。而在32位系统中,char*是占用四个字节的,因为一个指针变量占用的存储空间为4个 阅读全文
posted @ 2022-03-16 14:26 林西索 阅读(2508) 评论(0) 推荐(0) 编辑
  2022年2月28日
摘要: 参考:https://blog.csdn.net/chenkai5182/article/details/100710545 dll模块中用static实现的单例类,在链接到另一个模块后,会生成两个实例。 因为实际上dll和需要链接dll的另一个模块上,调用单例类是调用的两个不同的函数(函数逻辑相同 阅读全文
posted @ 2022-02-28 17:19 林西索 阅读(233) 评论(0) 推荐(0) 编辑
  2021年12月15日
摘要: 哈哈,再也不用记stoi stoll。。。这一堆函数了 #include <sstream> template <class SRC, class DST> void Str22Num(SRC& src, DST& dst) { std::stringstream in; in << src; st 阅读全文
posted @ 2021-12-15 16:50 林西索 阅读(40) 评论(0) 推荐(0) 编辑
  2021年12月7日
摘要: 转自:https://www.cnblogs.com/lidabo/p/7324568.html 最近在研究ffmpeg的编译,之前使用的Ubuntu,需要安装虚拟机,非常麻烦,所以后来改研究在Windows平台编译。 一开始遇到很多挫折,参考了网上很多的帖子,但要么不全要么内容已过期,经过我的反复 阅读全文
posted @ 2021-12-07 10:55 林西索 阅读(609) 评论(0) 推荐(0) 编辑
  2021年12月3日
摘要: #include <functional> #pragma once class CScopeGuard //用于延迟执行构造函数传入的函数 { //public: // CScopeGuard(); // ~CScopeGuard(); public: explicit CScopeGuard(s 阅读全文
posted @ 2021-12-03 17:18 林西索 阅读(65) 评论(0) 推荐(0) 编辑
  2021年10月19日
摘要: TCP协议简介:https://blog.csdn.net/hzp666/article/details/73480514 数据包报文结构:https://www.jianshu.com/p/19e8e93665af UDP包:如果有分包,主包和从包的结构不同。例:如果使用以太网,主包会有UDP包头 阅读全文
posted @ 2021-10-19 09:45 林西索 阅读(224) 评论(0) 推荐(0) 编辑
  2021年10月9日
摘要: https://zh.cppreference.com/w/cpp/header 阅读全文
posted @ 2021-10-09 10:06 林西索 阅读(17) 评论(1) 推荐(1) 编辑
  2021年9月16日
摘要: Windows端: ssh-keygen -t rsa,一路回车,创建的公钥会保存到当前用户的目录的.ssh下面。 复制这个id_rsa.pub到Ubuntu主机上。 Ubuntu端: ssh-keygen -t rsa,一路回车,在当前用户根目录下会生成一个 .ssh文件夹。 把windows下的 阅读全文
posted @ 2021-09-16 14:17 林西索 阅读(163) 评论(1) 推荐(0) 编辑