1. 从语法上讲,构造函数和析构函数都能调用虚函数,没有问题; 2. 从实际效果上,无法实现虚函数的作用, 例如,基类的构造函数中即使调用虚函数,也是调用的基类自己实现的虚函数; 基类的析构函数中即使调用虚函数,也是调用的基类自己实现的虚函数; 《Effective c++》条款09:不要在构造函数 ...
分类:
编程语言 时间:
2021-04-08 13:11:02
阅读次数:
0
算术运算符:+ - * / %(取余) ++() --() 赋值运算符= 关系运算符 > < >= <= == !=(不等于) instance 逻辑运算符 && || ! 与 或 非 ...
分类:
其他好文 时间:
2021-04-08 12:55:29
阅读次数:
0
1. 文字的居中 对于标准的markdown文本,是不支持居中对齐的。还好markdown支持html语言,所以我们采用html语法格式即可。 <center>这一行需要居中</center> 下面就是排版后的结果 这一行需要居中 2.文字的字体及颜色 2.1 字体更换 同样我们也需要遵照其标准的语 ...
分类:
其他好文 时间:
2021-04-06 15:17:53
阅读次数:
0
一、服务器信息 1、服务器名称:也能够寻云服务器 2、服务器版本:Linux VM-0-9-centos 3.10.0-862.el7.x86_64 #1 SMP Fri Apr 20 16:44:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux 3、内核版本信息 ...
分类:
编程语言 时间:
2021-04-05 12:50:29
阅读次数:
0
一、kmeans聚类 import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import re pd.set_option('max_columns', 600) pd ...
分类:
其他好文 时间:
2021-04-05 12:19:16
阅读次数:
0
import numpy as np import matplotlib import matplotlib.pyplot as plt matplotlib.rcParams['mathtext.fontset']='stix' plt.xlim(0, 5.5) plt.ylim(-5, 100) ...
分类:
其他好文 时间:
2021-04-05 12:14:03
阅读次数:
0
input(): 接收用户输入的内容 示例代码: result = input('请输入内容:') print(result) # 用户输入的是什么内容就打印什么内容 ...
分类:
其他好文 时间:
2021-04-05 11:54:27
阅读次数:
0
问题:在输出测试报告的时候,一直报错TypeError: a bytes-like object is required, not 'str';意思是:类型错误,需要类似字节的对象,而不是字符串 解决:百度了一下,网友给的方法很有效 改成下面这个 运行一下,果然没有报错了 但是又出现了新的问题,生成 ...
分类:
Web程序 时间:
2021-04-02 13:08:12
阅读次数:
0
总经理说:不管将来干什么,一定要夯实基础,一通百通,融会贯通。我觉得现在不管干着什么,基础也要学而时习之。//冒泡排序private static void sort(int[] arr) { for (int i = 0; i < arr.length-1; i++) {//5、因为两个元素比较一 ...
分类:
编程语言 时间:
2021-04-01 13:43:24
阅读次数:
0
实验结论 1、实验任务1 #include <stdio.h> int main(){ int num; scanf("%d", &num); printf("2049%04d\n", num); scanf("%d",&num); printf("2049%04d\n", num); scanf( ...
分类:
其他好文 时间:
2021-04-01 13:25:23
阅读次数:
0