上一页 1 2 3 4 5 6 7 8 9 10 ··· 38 下一页
摘要: anotherapp.h #include<afxwin.h> class myapp:public CWinApp { virtual BOOL InitInstance(); }; class mywnd:public CFrameWnd { public: mywnd(); //protect 阅读全文
posted @ 2019-12-30 01:42 saintdingtheGreat 阅读(333) 评论(0) 推荐(0) 编辑
摘要: HDC是一种“可画”的设备,WIN_PAINT是windows的一种消息事件,所有窗体可见部分都是他的杰作 实验环境:win7下vs2010 定义hdc设备,并利用WIN_PAINT绘画 LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM 阅读全文
posted @ 2019-12-29 22:31 saintdingtheGreat 阅读(869) 评论(0) 推荐(0) 编辑
摘要: 新建项目 Windows桌面向导: 选择配置项目 上机环境win7操作系统下vs2017,新建一个.c文件 简单窗口程序 #include<windows.h> int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR 阅读全文
posted @ 2019-12-29 09:41 saintdingtheGreat 阅读(946) 评论(0) 推荐(0) 编辑
摘要: 基本用法 #include<iostream> #include<time.h> #include<vector> #include<list> using namespace std; void main() { int a[] = {33,44,55,66,77,88}; int i; list 阅读全文
posted @ 2019-12-27 14:58 saintdingtheGreat 阅读(687) 评论(0) 推荐(0) 编辑
摘要: 上机环境centos7下 Qt5.11 gcc 一些简单的函数封装 #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <stdlib.h> struct coach { char name[60]; int age; }; str 阅读全文
posted @ 2019-12-25 20:26 saintdingtheGreat 阅读(221) 评论(0) 推荐(0) 编辑
摘要: 实验环境win7操作系统下vs2017 定义结构体用于存放教练信息 struct mycoach { char name[60]; int age; char skills[60]; }; 定义线性表存放教练信息 struct seqlist { struct mycoach* mch[10];// 阅读全文
posted @ 2019-12-24 17:03 saintdingtheGreat 阅读(421) 评论(0) 推荐(0) 编辑
摘要: 基本用法 #include<iostream> #include<vector> using namespace std; void main() { vector<int> a(10,1);//初始化容器,开辟10个单位空间·元素初始化为1 int i; cout << "初始化变量" << en 阅读全文
posted @ 2019-12-23 10:56 saintdingtheGreat 阅读(2361) 评论(0) 推荐(0) 编辑
摘要: 接口声明的三种形式 抛出一切形式的异常 void freeobj(mycoach &t) { if (t.age < 16) { cout <<"精神可嘉~但还是年龄太小" <<endl; throw t.age; } if (t.months <= 12) { cout << "精神可嘉~再练一段 阅读全文
posted @ 2019-12-22 18:51 saintdingtheGreat 阅读(247) 评论(0) 推荐(0) 编辑
摘要: 实验环境 win7 下的vs2017,基本原则:throw抛出的数据类型,和cathc语句的数据类型要一致 异常的引发和异常的处理可以分布在不同函数中,所以c++的异常是跨栈的 异常是由“地地道道“的错误所引发 #define _CRT_SECURE_NO_WARNINGS #include <io 阅读全文
posted @ 2019-12-22 12:38 saintdingtheGreat 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 该上机实验环境 linux mint IDE:qt5.11 代码复制到windows下vs2017报错,提示char* 类型不能直接赋值字符串 在linux mint下可以运行,测试目的:检验复制构造函数以及左移运算符在输出类对象方面的作用 #include <iostream> #include< 阅读全文
posted @ 2019-12-22 11:10 saintdingtheGreat 阅读(161) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 38 下一页