上一页 1 ··· 151 152 153 154 155 156 157 158 159 ··· 164 下一页
摘要: 成员变量指针 格式:类名::*成员指针变量名=&类名::成员变量; #include <iostream> using namespace std; class A { public: int m_data; A(int data=0):m_data(data){} }; int main() { 阅读全文
posted @ 2019-03-13 18:08 天子骄龙 阅读(1214) 评论(0) 推荐(0)
摘要: 个人理解:plt--画本 figure--产生画纸 子图 #figsize=(4,4) 设置窗口大小 参数是个元组,单位:英寸#facecol)or='#FF0000':可选参数,表示窗口的背景颜色,如果没有提供则默认为figure.facecolor#edgecolor:可选参数,表示窗口的边框颜 阅读全文
posted @ 2019-03-12 11:34 天子骄龙 阅读(321) 评论(0) 推荐(0)
摘要: &: 不能取常数的地址 &10 是错的 #include <stdio.h> int main() { int i=100; int* p; p=&i; //&i的类型:在i类型的基础上再加一个* //p不能保存常量地址 } #include <stdio.h> int main() { int i 阅读全文
posted @ 2019-03-09 09:32 天子骄龙 阅读(227) 评论(0) 推荐(0)
摘要: 窄字节与宽字节 视频教程: Ansi与Unicode编码 VC++6.0默认Ansi编码,VS2005以后默认Unicode编码 Ansi=窄字节 Unicode=宽字节 Ansi用char格式表示一个字符,占用一个字节的存储空间,最多表示255个字符 Unicode用两个字节表示一个字符,格式是u 阅读全文
posted @ 2019-03-09 05:25 天子骄龙 阅读(684) 评论(0) 推荐(0)
摘要: http://www.runoob.com/python3/python3-list.html 列表的数据项不需要具有相同的类型 列表的创建 1.用[] lq=["李明","张三","李四","王五"] 2.列表名=list(容器) str1=["我爱我的祖国"] lb=list(str1) #创建 阅读全文
posted @ 2019-03-08 11:29 天子骄龙 阅读(190) 评论(0) 推荐(0)
摘要: 常用字符串函数 #include <iostream> #include <string> #include <tchar.h> int main() { char a[] = "ab李明"; //窄字节 wchar_t w[] = L"ab中国"; //宽字节 TCHAR t[] = _T("ab 阅读全文
posted @ 2019-03-08 08:08 天子骄龙 阅读(2729) 评论(0) 推荐(0)
摘要: 安装 python -m pip install matplotlib 允许中文: 使用matplotlib的字体管理器指定字体文件 plt.rcParams['font.sans-serif']=['SimHei'] #指定默认字体 SimHei为黑体plt.rcParams['axes.unic 阅读全文
posted @ 2019-03-07 09:42 天子骄龙 阅读(432) 评论(0) 推荐(0)
摘要: #include <stdio.h> int main() { int suzu[5];//定义了一个一维数组,数组的元素个数是5个,数组的数据类型是int //数组的每个元素是紧密排列的 //索引0开始 int a = 10; int suzu5[a] ;//这种定义在是错误的,参数不能是变量 / 阅读全文
posted @ 2019-03-05 20:51 天子骄龙 阅读(166) 评论(0) 推荐(0)
摘要: 安装 pip3 install pandas s=pd.Series([1,3,6,90,44,1]) #创建序列【用列表创建】。数据源的维度必须是一维 #data 指定数据源 print(s) 前面自动产生一个序号 s=pd.Series(data=np.arange(5,9),index=['语 阅读全文
posted @ 2019-03-04 08:30 天子骄龙 阅读(823) 评论(0) 推荐(0)
摘要: 安装: pip install numpy pip install numpy -i https://pypi.douban.com/simple 豆瓣镜像下载 常量: np.pi π 创建矩阵数组 1 import numpy as np 2 # array=np.array([[1,2,3],[ 阅读全文
posted @ 2019-03-02 06:44 天子骄龙 阅读(525) 评论(0) 推荐(0)
上一页 1 ··· 151 152 153 154 155 156 157 158 159 ··· 164 下一页