04 2018 档案

摘要:什么是gcc gcc编译器(GNU C Compiler) 现在我们所说的 gcc 是 GUN Compiler Collection的缩写,可以支持多种语言编译,比如 C,C++,Java, pascal 等 阅读全文
posted @ 2018-04-30 11:33 喵小喵~ 阅读(169) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2018-04-29 23:03 喵小喵~ 阅读(177) 评论(0) 推荐(0)
摘要:1 C标准函数与系统函数的区别 文件的结构体: 1.1 I/O缓冲区 每一个FILE文件流都有一个缓冲区buffer,默认大小8192Byte。 1.2 效率 文件缓冲区会降低效率。这里提供缓冲区主要是为了减少磁盘的读取。 1.3 程序的跨平台性 事实上Unbuffered I/O这个名词是有些误导 阅读全文
posted @ 2018-04-27 18:31 喵小喵~ 阅读(309) 评论(0) 推荐(0)
摘要:你想以最快的速度学习人类史上最好的文本编辑器VIM吗?你先得懂得如何在VIM幸存下来,然后一点一点地学习各种戏法。 我建议下面这四个步骤: 当你走完这篇文章,你会成为一个vim的 superstar。 在开始学习以前,我需要给你一些警告: 学习vim在开始时是痛苦的。 需要时间 需要不断地练习,就像 阅读全文
posted @ 2018-04-27 15:07 喵小喵~ 阅读(233) 评论(0) 推荐(0)
摘要:1 ftp 1.1 ftp服务器 1.安装vsftpd服务器 sudo apt-get install vsftpd 2.配置vsftpd.conf文件 sudo vi /etc/vsftpd.conf 添加下面设置 (复制到里面即可) #这些设置系统默认是开启的,可以不管listen=NOlist 阅读全文
posted @ 2018-04-26 12:00 喵小喵~ 阅读(1308) 评论(0) 推荐(0)
摘要:1 shell shell:命令解释器,根据输入的命令执行相应命令. 1.1 shell家族 察看当前系统下有哪些shell: 察看当前系统正在使用的shell 常见的shell /bin/sh (已经被 /bin/bash 所取代)/bin/bash (就是 Linux 默认的 shell)/bi 阅读全文
posted @ 2018-04-24 16:44 喵小喵~ 阅读(526) 评论(0) 推荐(0)
摘要:概述: 1 人工神经网络介绍 2 人工神经元 3 MATLAB神经网络工具箱 4 感知器神经网络 5 感知器神经网络 5.1 设计实例分析 5.2 线性神经网络 6 设计实例分析 7 BP网络 7.1 BP网络的创建 7.2 BP网络实例分析 BP神经网络进行曲线拟合 8 径向基审计网络 9 广义回 阅读全文
posted @ 2018-04-23 11:42 喵小喵~ 阅读(8885) 评论(0) 推荐(0)
摘要:概述: 1 脚本M文件 2 函数M文件 3 函数的参数传递 4 流程控制 4.1 变量 4.2 顺序结构 4.3 分支结构 4.4 循环结构 4.5 try...catch语句 5 人机交互函数 6 函数类型 6.1 主函数 6.2 子函数 6.3 嵌套函数 6.4 私有函数 6.5 重载函数 6. 阅读全文
posted @ 2018-04-21 15:36 喵小喵~ 阅读(624) 评论(0) 推荐(0)
摘要:概述: 1 随机数的产生 2 二项分布随机数据的产生 3 泊松分布 3 指数分布随机数据的产生 4 均匀分布随机数据的产生 5 正态分布随机数据的产生 6 常见离散分布的概率密度函数 7 常见连续分布的概率密度函数 8 三大抽样分布的概率密度函数 9 随机变量的数字特征 9.1 平均值和中位数 9. 阅读全文
posted @ 2018-04-20 16:40 喵小喵~ 阅读(630) 评论(0) 推荐(0)
摘要:概述: 1 定积分概念 2 利用梯形求面积 3 利用矩形求面积 4 单变量数值积分求解 5 双重积分求解 6 三重积分求解 7 常微分方程 求微分方程的特解 求微分方程的解 阅读全文
posted @ 2018-04-20 14:33 喵小喵~ 阅读(818) 评论(0) 推荐(0)
摘要:概述: 1 多项式的求值与求根 2 多项式乘法和除法 3 多项式的导数和积分 4 多项式展开 5 多项式拟合 6 曲线拟合图形用户接口 7 一维插值 8 二维插值 9 样条插值 10 高维插值 11 函数的极限 阅读全文
posted @ 2018-04-20 10:56 喵小喵~ 阅读(1021) 评论(0) 推荐(0)
摘要:1 字符串处理函数 2 字符串的构造 3 字符串的比较 4 字符串的查找和替换 6 字符串的转换 7 字符的分类 8 字符串的执行 9 其他操作 阅读全文
posted @ 2018-04-20 09:22 喵小喵~ 阅读(1977) 评论(0) 推荐(0)
摘要:下面介绍矩阵的一些基本操作,包括矩阵的特征值,三角阵,对角阵,矩阵的翻转等,以及矩阵的一些特性,例如矩阵的秩,矩阵的迹.最后介绍了矩阵的超越函数. 1 方阵的行列式 2 特征值.特征向量和特征多项式 3 对角阵 4 上三角阵与下三角阵 5 矩阵的逆和伪逆(广义逆矩阵) 6 矩阵的秩 7 矩阵的迹 8 阅读全文
posted @ 2018-04-19 21:27 喵小喵~ 阅读(760) 评论(0) 推荐(0)
摘要:1 数组的建立和操作 1.1 建立二维数组 1.2 两点之间产生线性矢量 1.3 生成从10的a次方到10的b次方之间按对数等分的n个元素的行向量。 2 数组的算术运算 2.1 数组的乘法 2.2 数组的除法 3 数组的关系运算 4 数组的逻辑运算 5 数组信息的获取 6 矩阵的创建 7 矩阵的拓展 阅读全文
posted @ 2018-04-19 12:05 喵小喵~ 阅读(466) 评论(0) 推荐(0)
摘要:1 函数句柄 2 单元数组类型 单元数组是一种比较特殊的数据类型,每个元素都以单元的形式存在.在MATLAB中,采用大括号({})建立单元数组,也可以采用函数cell()来建立单元数组.在获取单元数组的元素时,也采用大括号表示下标. clear all %建立一个两行三列的单元数组 c = cell 阅读全文
posted @ 2018-04-19 09:32 喵小喵~ 阅读(365) 评论(0) 推荐(0)
摘要:1 串数组的属性和标识 2 利用串操作函数创建多行串数组 matlab综合例题,在MATLAB计算生成的图形上标出图名和最大值点的坐标 运行效果 3 利用元胞数组创建复杂字符串 4 串转换函数 5 元胞数组的创建和显示 6 元胞数组的扩充 7 cellplot能用图形形象化地表示元胞数组的内容 8 阅读全文
posted @ 2018-04-18 10:51 喵小喵~ 阅读(401) 评论(0) 推荐(0)
摘要:1.模型/视图类 2.模型 3.视图 4.代理 1 模型/视图类 InterView框架提供了一些可以直接使用的模型类和视图类,如QStandardModel类,QDirModel类,QStringListModel类,以及QColumnView类,QHeaderView类,QListView类,Q 阅读全文
posted @ 2018-04-15 23:56 喵小喵~ 阅读(1550) 评论(0) 推荐(0)
摘要:1 获取本机网络与通信 在网络应用中,经常需要获得本机的主机名.IP地址和硬件地址等网络信息.运用QHostInfo,QNetWorkInterface,QNetworkAddressEntry可获得本机的网络信息. widget.h 1 #ifndef WIDGET_H 2 #define WID 阅读全文
posted @ 2018-04-14 13:44 喵小喵~ 阅读(2221) 评论(0) 推荐(0)
摘要:2.1引导 2.2一维数组的创建与寻访 2.3二维数组的创建 2.4二维数组元素的标识 2.5二维数组的子数组寻访和赋值 2.6执行数组运算的常用函数 2.7数组运算和矩阵运算 2.8多项式的表达和创建 2.9多项式运算函数 2.10标准数组生成函数和数组操作函数 2.11数组构建技巧综合 2.12 阅读全文
posted @ 2018-04-12 14:55 喵小喵~ 阅读(1690) 评论(0) 推荐(0)
摘要:1.1 Command Window(命令行窗口)运用入门 1 计算器的用法 2 数值变量与表达式 3. 计算结果的图形表示 代码及注释 运行结果 代码 运行结果 1.2 现场菜单用于内存变量的查询和删除 1.在指令窗口运用who,whos查阅MATLABA内存变量 2.在指令窗口中运用clear指 阅读全文
posted @ 2018-04-12 11:58 喵小喵~ 阅读(717) 评论(0) 推荐(0)
摘要:widget.h 1 #ifndef MAPWIDGET_H 2 #define MAPWIDGET_H 3 4 #include <QGraphicsView> 5 #include <QLabel> 6 #include <QMouseEvent> 7 8 class MapWidget : p 阅读全文
posted @ 2018-04-11 16:53 喵小喵~ 阅读(1199) 评论(0) 推荐(0)
摘要:fly.h 1 #ifndef FLY_H 2 #define FLY_H 3 #include <QObject> 4 #include <QPainter> 5 #include <QGraphicsScene> 6 #include <QGraphicsView> 7 #include <QG 阅读全文
posted @ 2018-04-11 14:26 喵小喵~ 阅读(665) 评论(0) 推荐(0)
摘要:modellex.h 1 #ifndef MODELEX_H 2 #define MODELEX_H 3 #include <QAbstractItemModel> 4 #include <QVector> 5 #include <QMap> 6 #include <QStringList> 7 # 阅读全文
posted @ 2018-04-11 13:28 喵小喵~ 阅读(3317) 评论(0) 推荐(0)
摘要:1 #include "mainwindow.h" 2 #include 3 #include 4 #include 5 #include 6 7 #include 8 #include 9 #include 10 #include 11 #include 12 13 int main(int argc, char *argv[]) 14 { 15 ... 阅读全文
posted @ 2018-04-11 12:08 喵小喵~ 阅读(332) 评论(0) 推荐(0)
摘要:widget.h 1 #ifndef WIDGET_H 2 #define WIDGET_H 3 4 #include <QWidget> 5 #include <QPainter> 6 #include <QPen> 7 #include <QEvent> 8 9 namespace Ui { 1 阅读全文
posted @ 2018-04-11 11:36 喵小喵~ 阅读(231) 评论(0) 推荐(0)
摘要:dialog.h 1 #ifndef DIALOG_H 2 #define DIALOG_H 3 4 #include <QDialog> 5 #include <QLabel> 6 #include <QGridLayout> 7 #include <QMouseEvent> 8 #include 阅读全文
posted @ 2018-04-11 10:17 喵小喵~ 阅读(212) 评论(0) 推荐(0)
摘要:mainwindow.h 1 #ifndef MAINWINDOW_H 2 #define MAINWINDOW_H 3 4 #include <QMainWindow> 5 #include <QTextEdit> 6 #include <QMenu> 7 #include <QMenuBar> 阅读全文
posted @ 2018-04-10 23:37 喵小喵~ 阅读(828) 评论(0) 推荐(0)
摘要:运行效果 widget布局showwidget.h 1 #ifndef SHOWWIDGET_H 2 #define SHOWWIDGET_H 3 4 #include <QWidget> 5 #include <QLabel> 6 #include <QTextEdit> 7 #include < 阅读全文
posted @ 2018-04-10 13:14 喵小喵~ 阅读(4921) 评论(0) 推荐(1)
摘要:开始画面 1 #include "widget.h" 2 #include <QApplication> 3 #include <QSplashScreen> 4 5 int main(int argc, char *argv[]) 6 { 7 QApplication a(argc, argv); 阅读全文
posted @ 2018-04-09 22:45 喵小喵~ 阅读(197) 评论(0) 推荐(0)
摘要:myclock.h 1 #ifndef MYCLOCK_H 2 #define MYCLOCK_H 3 4 #include <QObject> 5 #include <QLCDNumber> 6 #include <QWidget> 7 #include <QMouseEvent> 8 9 cla 阅读全文
posted @ 2018-04-09 22:23 喵小喵~ 阅读(229) 评论(0) 推荐(0)
摘要:dialog.h dialog.cpp 阅读全文
posted @ 2018-04-09 21:33 喵小喵~ 阅读(3421) 评论(0) 推荐(0)
摘要:1 #ifndef MAINWINDOW_H 2 #define MAINWINDOW_H 3 4 #include 5 #include 6 7 namespace Ui { 8 class MainWindow; 9 } 10 11 class MainWindow : public QMainWindow 12 { 13 Q_OBJECT 14 15 ... 阅读全文
posted @ 2018-04-09 16:29 喵小喵~ 阅读(274) 评论(0) 推荐(1)
摘要:1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 void main1() 8 { 9 //精确匹配 10 //regex reg("1234"); 11 //匹配四个数字 12 //regex reg("\\d{4}")... 阅读全文
posted @ 2018-04-09 12:41 喵小喵~ 阅读(139) 评论(0) 推荐(0)
摘要:qint64转QString 1 qint64 size = info.size(); 2 //qint64 转QString 3 QString size2 = tr("%1").arg(size); 获取文件属性 1 #include "mainwindow.h" 2 #include "ui_ 阅读全文
posted @ 2018-04-09 11:08 喵小喵~ 阅读(2284) 评论(0) 推荐(0)
摘要:1 #include "mainwindow.h" 2 #include 3 #include 4 #include 5 #include 6 7 qint64 getitall(const QString &path) 8 { 9 //构造初始化 10 QDir dir(path); 11 qint64 size = 0; 12 13 //... 阅读全文
posted @ 2018-04-09 10:46 喵小喵~ 阅读(188) 评论(0) 推荐(0)
摘要:mainwindow.h 1 #ifndef MAINWINDOW_H 2 #define MAINWINDOW_H 3 4 #include <QMainWindow> 5 #include <QFileSystemWatcher> 6 #include <QLabel> 7 8 namespac 阅读全文
posted @ 2018-04-09 10:31 喵小喵~ 阅读(126) 评论(0) 推荐(0)
摘要:1 #include "mainwindow.h" 2 #include 3 #include 4 #include 5 6 int main(int argc, char *argv[]) 7 { 8 QApplication a(argc, argv); 9 10 QFile file("1.bin"); 11 file.open(QIOD... 阅读全文
posted @ 2018-04-09 10:14 喵小喵~ 阅读(236) 评论(0) 推荐(0)
摘要:1 #include "mainwindow.h" 2 #include "ui_mainwindow.h" 3 #include 4 #include 5 #include 6 7 MainWindow::MainWindow(QWidget *parent) : 8 QMainWindow(parent), 9 ui(new Ui::MainWind... 阅读全文
posted @ 2018-04-09 10:00 喵小喵~ 阅读(356) 评论(0) 推荐(0)
摘要:文件对话框 #include<QFileDialog> 1 //文件对话框 2 void Dialog::on_pushButton_clicked() 3 { 4 //定义显示文件的类型 窗口标题 可供选择的类型 5 QString qstr = QFileDialog::getOpenFileN 阅读全文
posted @ 2018-04-08 23:09 喵小喵~ 阅读(2251) 评论(0) 推荐(0)
摘要:mainwindow.h 1 #ifndef MAINWINDOW_H 2 #define MAINWINDOW_H 3 4 #include <QMainWindow> 5 #include <QTextEdit> 6 #include <QEvent> 7 #include <QtEvents> 阅读全文
posted @ 2018-04-08 21:36 喵小喵~ 阅读(262) 评论(0) 推荐(0)
摘要:mainwindow.h 1 #ifndef MAINWINDOW_H 2 #define MAINWINDOW_H 3 4 #include <QMainWindow> 5 #include <QKeyEvent> 6 7 namespace Ui { 8 class MainWindow; 9 阅读全文
posted @ 2018-04-08 21:16 喵小喵~ 阅读(174) 评论(0) 推荐(0)
摘要:头文件 1 #include <QMouseEvent> 2 #include <QStatusBar> 3 #include <QLabel> 1 protected: 2 //鼠标按下 3 void mousePressEvent(QMouseEvent *e); 4 //鼠标移动 5 void 阅读全文
posted @ 2018-04-08 19:50 喵小喵~ 阅读(150) 评论(0) 推荐(0)
摘要:头文件 1 #include <QHBoxLayout> 2 #include <QPushButton> 3 #include <QVBoxLayout> 4 #include <QLineEdit> 5 #include <QLabel> mainwindow.cpp 1 #include "m 阅读全文
posted @ 2018-04-08 19:09 喵小喵~ 阅读(107) 评论(0) 推荐(0)
摘要:运行效果 关键代码: dialog.h 1 #ifndef DIALOG_H 2 #define DIALOG_H 3 4 #include <QDialog> 5 #include <QTextEdit> 6 #include <QComboBox> 7 #include <QLineEdit> 阅读全文
posted @ 2018-04-08 17:52 喵小喵~ 阅读(131) 评论(0) 推荐(0)
摘要:1 Dialog::Dialog(QWidget *parent) : 2 QDialog(parent), 3 ui(new Ui::Dialog) 4 { 5 ui->setupUi(this); 6 7 list = new QListWidget(this); 8 list->insertItem(0,"win1"); 9 ... 阅读全文
posted @ 2018-04-08 17:37 喵小喵~ 阅读(324) 评论(0) 推荐(0)
摘要:运行效果 包含头文件 关键代码 阅读全文
posted @ 2018-04-08 17:04 喵小喵~ 阅读(277) 评论(0) 推荐(0)
摘要:1 int main(int argc, char *argv[]) 2 { 3 QApplication a(argc, argv); 4 //MainWindow w; 5 //w.show(); 6 //左右分割 7 QSplitter *spmain = new QSplitter(Qt::Horizontal,0); 8 ... 阅读全文
posted @ 2018-04-08 16:49 喵小喵~ 阅读(212) 评论(0) 推荐(0)
摘要:1 MainWindow::MainWindow(QWidget *parent) : 2 QMainWindow(parent), 3 ui(new Ui::MainWindow) 4 { 5 ui->setupUi(this); 6 //设置最小大小 7 this->setMinimumSize(200,100); 8 9 ... 阅读全文
posted @ 2018-04-08 14:28 喵小喵~ 阅读(139) 评论(0) 推荐(0)
摘要:1 //可以写任何复杂正则表达式 2 QRegExp reg("[A-Z]"); 3 ui->lineEdit->setValidator(new QRegExpValidator(reg,this)); 阅读全文
posted @ 2018-04-08 14:21 喵小喵~ 阅读(115) 评论(0) 推荐(0)
摘要:QList 1 int main1(int argc, char *argv[]) 2 { 3 QApplication a(argc, argv); 4 5 QList<int> mylist={10,20,30}; 6 mylist << 100 << 200 << 300; 7 //创建容器 阅读全文
posted @ 2018-04-08 14:03 喵小喵~ 阅读(454) 评论(0) 推荐(0)
摘要:ui mainwindow.h 1 #ifndef MAINWINDOW_H 2 #define MAINWINDOW_H 3 4 #include <QMainWindow> 5 #include <QStringData> 6 #include <QStringList> 7 #include 阅读全文
posted @ 2018-04-08 13:29 喵小喵~ 阅读(172) 评论(0) 推荐(0)
摘要:UI 关键代码 mainwindow.h 1 QStringListModel *slm; 2 QStringList *sl; mainwindow.cpp init初始化 1 //初始化combox 2 ui->comboBox->insertItem(0,"山羊座","山羊座1"); 3 ui 阅读全文
posted @ 2018-04-08 12:59 喵小喵~ 阅读(273) 评论(0) 推荐(0)
摘要:UI mainwindow.h 1 #ifndef MAINWINDOW_H 2 #define MAINWINDOW_H 3 4 #include <QMainWindow> 5 #include <QStringListModel> 6 7 namespace Ui { 8 class Main 阅读全文
posted @ 2018-04-07 22:35 喵小喵~ 阅读(837) 评论(0) 推荐(0)
摘要:1 #include "mainwindow.h" 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 9 //STL list 10 int main1(int argc, char *argv[]) 11 { 12 QApplication a(a... 阅读全文
posted @ 2018-04-07 19:08 喵小喵~ 阅读(255) 评论(0) 推荐(0)
摘要:mainwindow.h #ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> namespace Ui { class MainWindow; } class MainWindow : public QMainWindow 阅读全文
posted @ 2018-04-07 17:15 喵小喵~ 阅读(228) 评论(0) 推荐(0)
摘要:mainwindow.h 1 #ifndef MAINWINDOW_H 2 #define MAINWINDOW_H 3 4 #include <QMainWindow> 5 6 namespace Ui { 7 class MainWindow; 8 } 9 10 class MainWindow 阅读全文
posted @ 2018-04-07 15:51 喵小喵~ 阅读(325) 评论(0) 推荐(0)
摘要:1 #include 2 3 using namespace std; 4 5 //命名空间 6 namespace smart_point 7 { 8 //智能指针计数类 9 class smart_count 10 { 11 public: 12 //构造函数 13 ... 阅读全文
posted @ 2018-04-04 21:54 喵小喵~ 阅读(225) 评论(0) 推荐(0)
摘要:Node.h 1 #pragma once 2 3 template<class T> 4 class Node 5 { 6 public: 7 T t; 8 Node *pNext; 9 10 }; forwart_list.h 1 #pragma once 2 #include "Node.h" 阅读全文
posted @ 2018-04-04 00:36 喵小喵~ 阅读(204) 评论(0) 推荐(0)
摘要:myvector.h 1 #pragma once 2 #include <initializer_list> 3 #include <iostream> 4 using namespace std; 5 6 template<class T> 7 class myvector 8 { 9 publ 阅读全文
posted @ 2018-04-03 22:02 喵小喵~ 阅读(143) 评论(0) 推荐(0)
摘要:string.h 1 #pragma once 2 #include <string> 3 #include <cstdlib> 4 #include <functional> 5 using namespace std; 6 7 class outofrange 8 { 9 10 }; 11 12 阅读全文
posted @ 2018-04-03 19:10 喵小喵~ 阅读(276) 评论(0) 推荐(0)
摘要:1 #define _CRT_SECURE_NO_WARNINGS 2 #include 3 #include 4 #include 5 using namespace std; 6 using namespace boost; 7 8 9 void main() 10 { 11 boost::thread t1([]() {MessageBoxA(0, "1... 阅读全文
posted @ 2018-04-02 10:55 喵小喵~ 阅读(136) 评论(0) 推荐(0)
摘要:1 #define _CRT_SECURE_NO_WARNINGS 2 #include 3 #include 4 #include 5 using namespace std; 6 using namespace boost; 7 8 9 void main() 10 { 11 boost::filesystem::directory_iterator be... 阅读全文
posted @ 2018-04-02 10:49 喵小喵~ 阅读(174) 评论(0) 推荐(0)
摘要:1 #define _CRT_SECURE_NO_WARNINGS 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 9 using namespace std; 10 using namespace boost; 11 12 //#pragma comment(lib,"li... 阅读全文
posted @ 2018-04-02 10:38 喵小喵~ 阅读(200) 评论(0) 推荐(0)
摘要:1 #define _CRT_SECURE_NO_WARNINGS 2 #include 3 #include 4 #include 5 #include //信号 6 #include 7 8 using namespace std; 9 using namespace boost; 10 11 //信号模拟 12 class button... 阅读全文
posted @ 2018-04-02 10:25 喵小喵~ 阅读(210) 评论(0) 推荐(0)
摘要:1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 class mythread :public thread 8 { 9 public: 10 mythread() :thread() 11 { 12 13 } 14 15 //class 模... 阅读全文
posted @ 2018-04-02 00:00 喵小喵~ 阅读(119) 评论(0) 推荐(0)
摘要:全局变量,多线程操作不安全,可能会导致结果不安全 互斥锁,操作很慢,但是结果正确 原子变量,操作很快,结果正确 代码示例 阅读全文
posted @ 2018-04-01 23:48 喵小喵~ 阅读(145) 评论(0) 推荐(0)
摘要:1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 void run() 8 { 9 MessageBox(0, L"hello", L"hello", 0); 10 } 11 12 void runA(const wchar_t *s, const wchar_t *... 阅读全文
posted @ 2018-04-01 23:41 喵小喵~ 阅读(317) 评论(0) 推荐(0)
摘要:1 #include //进程通信,获取未来的结果 2 #include 3 #include 4 #include 5 #include //时间 6 #include //互斥量 7 using namespace std; 8 9 //创建互斥量 10 mutex m; 11 12 //全局通信变量 13 promise val; 14 15 void main... 阅读全文
posted @ 2018-04-01 23:20 喵小喵~ 阅读(306) 评论(0) 推荐(0)
摘要:1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 8 //全局通信变量 9 promise val; 10 11 void main() 12 { 13 auto fun1 = []() 14 { 15 //一直等待,获取全... 阅读全文
posted @ 2018-04-01 23:04 喵小喵~ 阅读(182) 评论(0) 推荐(0)
摘要:1 #include 2 using namespace std; 3 4 //错误模板类 5 template 6 class error 7 { 8 T t; 9 public: 10 void showerror() 11 { 12 cout 24 class print3d 25 { 26 pu... 阅读全文
posted @ 2018-04-01 22:41 喵小喵~ 阅读(143) 评论(0) 推荐(0)
摘要:1 #include 2 3 #include 4 using namespace std; 5 ////非安全退出,结束进程, 6 //C++ 必须释放对象,最后结束,安全退出 7 8 class pstr 9 { 10 int *p; 11 public: 12 pstr() 13 { 14 cout << "构造" << end... 阅读全文
posted @ 2018-04-01 20:28 喵小喵~ 阅读(173) 评论(0) 推荐(0)
摘要:1 #include 2 #include 3 using namespace std; 4 5 //继承自带的异常 6 class sizeerror :public exception 7 { 8 public: 9 sizeerror() :exception("尺寸大小异常") 10 { 11 12 } 13 14 const ... 阅读全文
posted @ 2018-04-01 20:16 喵小喵~ 阅读(325) 评论(0) 推荐(0)
摘要:1 #include 2 using namespace std; 3 4 //纯虚类 5 class error 6 { 7 public: 8 //纯虚函数 9 virtual void showerror() = 0; 10 }; 11 12 class big :public error 13 { 14 public: 15 void sh... 阅读全文
posted @ 2018-04-01 12:38 喵小喵~ 阅读(165) 评论(0) 推荐(0)
摘要:1 #include 2 using namespace std; 3 4 //如果产生继承,子类的对象也可以被父类捕获.因为子类内部包含父类对象 5 class outerror 6 { 7 public: 8 }; 9 10 class newerror:public outerror 11 { 12 public: 13 }; 14 15 class myclas... 阅读全文
posted @ 2018-04-01 12:14 喵小喵~ 阅读(175) 评论(0) 推荐(0)
摘要:异常类 1 #pragma once 2 #include <initializer_list> 3 using namespace std; 4 5 class memerror 6 { 7 }; 8 9 class outerror 10 { 11 }; 12 13 class safeinta 阅读全文
posted @ 2018-04-01 11:44 喵小喵~ 阅读(140) 评论(0) 推荐(0)
摘要:1 #include 2 using namespace std; 3 4 //try尝试执行,抛出throw,throw之后语句不再执行 5 //catch处理throw的异常 6 7 void main() 8 { 9 float fl1, fl2; 10 cin >> fl1 >> fl2; 11 12 //尝试执行,抛出类型检测 13 ... 阅读全文
posted @ 2018-04-01 00:16 喵小喵~ 阅读(254) 评论(0) 推荐(0)
摘要:1 #include 2 using namespace std; 3 4 //try尝试执行,抛出throw,throw之后语句不再执行 5 //catch处理throw的异常 6 7 void main() 8 { 9 float fl1, fl2; 10 cin >> fl1 >> fl2; 11 12 //尝试执行,抛出类型检测 13 ... 阅读全文
posted @ 2018-04-01 00:15 喵小喵~ 阅读(128) 评论(0) 推荐(0)