摘要: ![](https://img2022.cnblogs.com/blog/1360710/202211/1360710-20221125153917264-1366709479.png) 阅读全文
posted @ 2022-11-25 15:40 iwetuan 阅读(17) 评论(0) 推荐(0) 编辑
摘要: cargo toml [package] name = "serialports" version = "0.1.0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/ 阅读全文
posted @ 2022-01-05 18:53 iwetuan 阅读(329) 评论(0) 推荐(0) 编辑
摘要: 工厂模式rust 阅读全文
posted @ 2021-12-30 14:03 iwetuan 阅读(166) 评论(0) 推荐(0) 编辑
摘要: #include // class Base { public: Base() { stdcout << "base" << stdendl; } }; class Ca { public: Ca() { stdcout << "ca" << stdendl; } }; //初始化顺序 //1.基类 阅读全文
posted @ 2021-11-30 10:31 iwetuan 阅读(69) 评论(0) 推荐(0) 编辑
摘要: // ConsoleApplication1.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include <iostream> int _tmain(int argc, _TCHAR* argv[]) { //因为-1变成255 int a = -1; 阅读全文
posted @ 2021-11-03 12:25 iwetuan 阅读(483) 评论(0) 推荐(0) 编辑
摘要: src.go package archive_tar import ( "archive/tar" "archive/zip" "fmt" "io" "os" ) type files struct { name, content string } //写测试 func TarWriteTest() 阅读全文
posted @ 2021-11-01 17:02 iwetuan 阅读(74) 评论(0) 推荐(0) 编辑
摘要: package main import ( "bufio" "fmt" "log" "os" "time" ) func main() { //开始时间 t1 := time.Date(2020, 3, 1, 0, 0, 0, 0, time.Local) //结束时间 t2 := time.Dat 阅读全文
posted @ 2021-10-25 18:41 iwetuan 阅读(30) 评论(0) 推荐(0) 编辑
摘要: package main import "fmt" type dummy interface { show() } type student struct{} func (stu *student) show() { } func xx() dummy { var stu *student if s 阅读全文
posted @ 2021-10-20 15:12 iwetuan 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 转载 https://www.cnblogs.com/yimaochun/archive/2011/07/29/2120653.html 在.Cxx文件添加 #pragma comment( linker, "/subsystem:"windows" /entry:"mainCRTStartup"" 阅读全文
posted @ 2021-10-15 13:58 iwetuan 阅读(330) 评论(0) 推荐(0) 编辑
摘要: Rust实现打印变量的的类型名 use std::fmt::{Debug}; #[derive(Debug)] enum Unit{ P1,P2 } //实行trait bound fn type_v<T>(t:T) where T:Debug { println!("{:?},{}",t,core 阅读全文
posted @ 2021-10-10 14:09 iwetuan 阅读(442) 评论(0) 推荐(0) 编辑