c++
不见月光见星光
这个作者很懒,什么都没留下…
展开
-
QT 开发学习 一
一 环境的配置 个人是建议使用一些IDE去写QT的代码,毕竟原生的环境实在是有点…比如CLion就很合适,此外还要去下载Qt creator,将其编译器的路径加入到我们的项目路径中去,这部分大家可以在网上搜教程二 Qt的项目结构 在QT中主要是以 *.cpp , *.h文件,在cpp文件中去声明类成员函数,在h文件中去声明我们的结构1. *.h文件的书写 首先我们要去define这个类#ifndef SUBWIN_H#define SUBWIN_H#include <QWidget&g原创 2021-11-06 16:52:45 · 302 阅读 · 0 评论 -
C++ primer 学习 二 迭代器
一 定义迭代器可以看作是一种更加通用的指针,通过它可以去访问vector或者string中的元素二 用法vector<int>::iterator it;vector<int>q;q.push_back(1);it = q.begin();printf("%d",*it);在声明时要使用type<elemtype>::iterator <name>这种形式去进行声明用法是与指针是基本相似的int int_arr[] = {0,1,2,3,原创 2021-11-01 18:21:07 · 280 阅读 · 0 评论 -
C++ primer 学习 一 类型
一 指针1. 指针的声明int *p // 此时的p是一个int型的指针int *p = 0;// WA,because the p haven't be allocate the spaceint *p,p1;// you must be attention that the p1 is the type of int,because the * only declocate the p2. 通过指针的赋值int *p = &a;*p = 1; // through this w原创 2021-10-14 23:11:00 · 115 阅读 · 0 评论