摘要: 1 #include "mainwindow.h" 2 #include 3 4 //创建一个MainWindow类 5 class myclass 6 { 7 private: 8 MainWindow *p; 9 //初始化内存 10 myclass(int i) 11 { 12 p = new MainWindow[i]... 阅读全文
posted @ 2018-03-16 22:50 喵小喵~ 阅读(199) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 using namespace std; 3 4 //myclass类 5 class myclass 6 { 7 public: 8 int add(int a, int b) 9 { 10 return a + b; 11 } 12 int sub(int a, int b) 13 { 1... 阅读全文
posted @ 2018-03-16 20:04 喵小喵~ 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 设置断点调试 在一行代码的左侧点击即可设置断点,按F5(调试->开始调试)即可运行到第一个端点处暂停 逐语句调试 按F11(调试->逐语句)即可开始一步一步执行 逐过程调试 按F10(调试->逐过程)开始逐过程调试,此方法不会进入调用的函数里面 原文此处的 Step into a property 阅读全文
posted @ 2018-03-16 19:02 喵小喵~ 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 using namespace std; 3 4 class myclass 5 { 6 public: 7 int add(int a,int b) 8 { 9 return a + b; 10 } 11 }; 12 13 void main() 14 { 15 myclass my1; 16 ... 阅读全文
posted @ 2018-03-16 18:50 喵小喵~ 阅读(184) 评论(0) 推荐(0) 编辑
摘要: 面向过程: 创建一个类继承dialog,mydialog,添加两个变量 main.cpp中初始化 dialog.cpp中实现按钮的操作 面向对象: mg.h 1 #ifndef MG_H 2 #define MG_H 3 #include "mydialog.h" 4 5 class mg 6 { 阅读全文
posted @ 2018-03-16 14:27 喵小喵~ 阅读(450) 评论(0) 推荐(0) 编辑