摘要: #include <fstream>//ifstream读文件,ofstream写文件,fstream读写文件 #include <string>//文本对象,储存读取的内容 #include <iostream>//屏幕输出cout #include <cstdlib>//调用system("pa 阅读全文
posted @ 2020-10-30 09:27 leochan007 阅读(65) 评论(0) 推荐(0) 编辑
摘要: // #include <vcl.h> #pragma hdrstop #include "Unit1.h" // #pragma package(smart_init) #pragma resource "*.dfm" TForm1 *Form1; class CAppleDemo { publi 阅读全文
posted @ 2020-10-21 15:36 leochan007 阅读(162) 评论(0) 推荐(0) 编辑
摘要: 要取得[a,b)的随机整数,使用 (rand() % (b-a))+ a (结果值含a不含b)。 要取得[a,b]的随机整数,使用 (rand() % (b-a+1))+ a (结果值含a和b)。 要取得(a,b]的随机整数,使用 (rand() % (b-a))+ a + 1 (结果值不含a含b)。 (总的来说,通用公式:a + rand() % n ;其中的a是起始值,n... 阅读全文
posted @ 2019-10-31 13:22 leochan007 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 1 #include "stdafx.h" 2 #include <iostream> 3 using namespace std; 4 template<typename T> 5 //整数或浮点数皆可使用 6 void bubble_sort(T arr[], int len,int index=0) 7 { 8 int i, j; T temp; 9 for (i = 0; i < len 阅读全文
posted @ 2019-10-17 13:18 leochan007 阅读(207) 评论(0) 推荐(0) 编辑
摘要: 1 #include <Windows.h> 2 #include <stdio.h> 3 struct tagCONTAINING_RECORD 4 { 5 int a; 6 char b; 7 int c; 8 int d; 9 }; 10 // 使用 CONTAINING_RECORD 11 void test(char* cb) 12 { 13 tagCONTAINING_RECORD * 阅读全文
posted @ 2019-08-15 19:06 leochan007 阅读(206) 评论(0) 推荐(0) 编辑
摘要: vs2017 专业版 KBJFW-NXHK6-W4WJM-CRMQB-G3CDH 阅读全文
posted @ 2019-03-28 17:26 leochan007 阅读(223) 评论(0) 推荐(0) 编辑
摘要: MSVCRTD.lib(crtexew.obj) : error LNK2019: 无法解析的外部符号 _WinMain@16 产生这个问题的真正原因是c++语言运行时找不到适当的程序入口函数,一般情况下,如果是windows程序,那么WinMain是入口函数,在VS2010中新建项目为“win32 阅读全文
posted @ 2019-03-25 14:10 leochan007 阅读(197) 评论(0) 推荐(0) 编辑
摘要: setuptools 安装 https://pypi.org/project/setuptools/#files pip安装 https://pypi.org/project/pip/#files 阅读全文
posted @ 2018-12-27 11:09 leochan007 阅读(392) 评论(0) 推荐(0) 编辑
摘要: VisualGDBpjbd.rar https://download.csdn.net/download/u014094429/10762497 // 获取工程路径 #include <stdio.h>#include <stdlib.h>#include <unistd.h>#define MAX 阅读全文
posted @ 2018-11-03 18:00 leochan007 阅读(102) 评论(0) 推荐(0) 编辑
摘要: package main import ( "fmt" "reflect" ) //定义控制器函数Map类型,便于后续快捷使用 type ControllerMapsType map[string]reflect.Value //声明控制器函数Map类型变量 var ControllerMaps ControllerMapsType //定义路由器结构类型 type Routers ... 阅读全文
posted @ 2018-10-16 11:16 leochan007 阅读(223) 评论(0) 推荐(0) 编辑