2023年4月16日

摘要: #include <iostream> #include <chrono> #include <thread> void printNumbers1() { for (int i = 1; i <= 10000; i++) { std::cout << "Thread 1: " << i << st 阅读全文
posted @ 2023-04-16 14:59 Z_Chan 阅读(37) 评论(0) 推荐(0)
摘要: auto 是 C++11 中新增的一种类型推导关键字,可以根据变量的初始化表达式,自动推导出相应的类型。使用 auto 可以简化代码,减少类型错误的发生,提高代码的可读性和可维护性。 下面是 auto 的使用示例,假设我们有一个整数变量 x,可以这样使用 auto 进行类型推导: auto x = 阅读全文
posted @ 2023-04-16 14:49 Z_Chan 阅读(26) 评论(0) 推荐(0)
摘要: #include <iostream> #include <vector> int main() { std::vector<std::string> con; con.push_back("9999"); std::cout<<con[0]; return 0; } vector搞了一个多态,你可 阅读全文
posted @ 2023-04-16 14:35 Z_Chan 阅读(53) 评论(0) 推荐(0)
摘要: 这个也是和Java不同的地方,作用是为了防止类的名字冲突 #include <iostream> namespace myspace{ class A{ public: std::string head; private: std::string body; }; } namespace myspa 阅读全文
posted @ 2023-04-16 14:15 Z_Chan 阅读(20) 评论(0) 推荐(0)
摘要: 这个是用来include的防止多次重复include #ifndef A_H #define A_H int test(){ } #endif 阅读全文
posted @ 2023-04-16 14:03 Z_Chan 阅读(17) 评论(0) 推荐(0)
摘要: #include <iostream> class A{ public: std::string head; private: std::string body; }; int main() { A a; a.head="888"; a.body="999"; return 0; } 报错结果 ma 阅读全文
posted @ 2023-04-16 13:37 Z_Chan 阅读(16) 评论(0) 推荐(0)
摘要: #include <iostream> class A{ public: std::string head; void hello(std::string str){ std::cout<<str<<head<<std::endl; } }; int main() { A a; std::strin 阅读全文
posted @ 2023-04-16 13:29 Z_Chan 阅读(14) 评论(0) 推荐(0)

2023年4月11日

摘要: 环境需求: You will need Android NDK r15 or higher to build Ceres solver. eigen3我当时编译的时候自己先交叉编译了eigen3,这个东西好像只有头文件,好像不存在移植,都是通用的 编译 cmake \ -DCMAKE_TOOLCHA 阅读全文
posted @ 2023-04-11 13:44 Z_Chan 阅读(383) 评论(0) 推荐(0)
摘要: 需要的工具:U盘 1. 打开ubuntu启动盘制作工具,下载ubuntu镜像,制作启动器 2.u盘启动,进入try ubuntu 3.终端打开gparted 分割出一块合适大小的nfts区域用来装windows,如果直接用ubuntu的话由于本身的磁盘就在使用所以不能操作,只能在类似pe的系统里面操 阅读全文
posted @ 2023-04-11 13:22 Z_Chan 阅读(1766) 评论(0) 推荐(0)

2023年4月6日

摘要: 打开wireshark发现很多MDNS,数据内容是xxx的手机,比如鸡儿的手机 答案: MDNS是指多播域名解析协议(Multicast Domain Name System),也称为零配置网络。它是一种用于在局域网上自动发现网络设备和服务的协议,使得设备可以在不需要中央服务器注册的情况下,通过其名 阅读全文
posted @ 2023-04-06 16:34 Z_Chan 阅读(3759) 评论(0) 推荐(0)

导航