当前位置: 首页 > news >正文

wordpress精致建站网站推广的方式有

wordpress精致建站,网站推广的方式有,用jsp做肯德基的网站,软件定制开发如何报价面试遇到的新知识点 char str[10],只有10个字符的空间,但是只能存储9个字符,最后一个字符用来存储终止符\0 strlen只会计算\n,不会计算\0 值传递: void test2(char * str) {str "hello\n"; }int main() {char * str;test2(str);…

面试遇到的新知识点

        char str[10],只有10个字符的空间,但是只能存储9个字符,最后一个字符用来存储终止符'\0'

        strlen只会计算'\n',不会计算'\0'

值传递:

void test2(char * str)
{str = "hello\n";
}int main()
{char * str;test2(str);cout << str;return 0;
}

引用传递

void test3(char ** str)
{*str = "hello\n";
}int main()
{char * str;test3(&str);cout << str;return 0;
}

只有传变量的地址对变量进行解引用才能够修改变量的值。

空类里面有什么?

默认成员函数

1.默认构造

2.拷贝构造

3.赋值运算符

4.移动构造

5.移动赋值

6.析构函数

关于最近的一些面试感受

明显感觉好多岗位都交叉着QT,别人问我QT我都答不上来,只能说一个信号槽和用QT封装了简单的网页。

感觉拿不出手,得好好钻研QT了,至少能吹的出来。

c++的排序算法,快排,堆排,后面还要继续更新一个归并排序,将这三个排序算法掌握基本是够用了;

池性组件,后面还要更新内存池,连接池之类的。

然后把基本的排序和池性组件理清楚,边开始学QT边写算法题。目前来看回溯算法算是入门了,但是动态规划,贪心算法和单调栈还是不清楚,争取把这些搞掉。今天开始学习QT,历时一个礼拜应该能小有成就吧。

QT

QT Creator的界面介绍

项目的结构

简单的QT程序

MainWindow::MainWindow(QWidget *parent): QMainWindow(parent),lab(new QLabel("hello",this)), ui(new Ui::MainWindow)
{ui->setupUi(this);// 设置标签的位置lab->setGeometry(100,100,200,200);// 设置标签的颜色lab->setStyleSheet("QLabel{background-color:green;color:red}");// 设置字体的大小lab->setFont(QFont("楷书",22));
}

信号槽机制

信号(signal)

信号的本质是事件,信号展现方式就是函数。当一个事件发生之后,则发出一个信号(signal)。

槽(slot)

对信号响应的函数

槽与普通函数的区别:

槽函数可以与一个信号关联,当信号被发射的时候,关联的槽函数被自动执行处理

信号与槽关联是使用QObject::connect()函数进行实现

connect

sender:发出信号的对象

signal:sender对象的信号

receiver:信号接收者

method:receiver对象的槽函数,当检测到sender信号,receiver对象调用method方法

信号与槽的连接方式

一个信号可以与另一个信号相连

// 信号一可以触发信号二的发送
connect(object1,SIGNAL(signal1),object2,SIGNAL(signal1));

同一个信号可以和多个槽相连

connect(object1,SIGNAL(signal1),object2,SIGNAL(slot1));
connect(object1,SIGNAL(sIgnal1),object3,SIGNAL(slot2));

同一个槽可以响应多个信号

connect(object1,SIGNAL(signal1),object2,SIGNAL(slot1));
connect(object3,SIGNAL(signal3),object2,SIGNAL(slot1));

常用连接方案

connect(object1,SIGNAL(signal),object2,SLOT(slot));

实战

计算圆球体积

头文件

头文件(dialog.h)
#ifndef DIALOG_H
#define DIALOG_H
​
#include <QDialog>
// 引入标签,命令按钮
#include<qlabel.h>
#include<qpushbutton.h>
#include<qlineedit.h>
​
class Dialog : public QDialog
{Q_OBJECT
​
public:Dialog(QWidget *parent = nullptr);~Dialog();
private:QLabel *lab1, *lab2;QLineEdit *lEdit;QPushButton *pbt;
​
// 设置槽函数
public slots:void CalculateCircleV();
};
#endif // DIALOG_H

main.cpp
#include "dialog.h"
#include <QApplication>
​
int main(int argc, char *argv[])
{QApplication a(argc, argv);Dialog w;// 设置标题w.setWindowTitle("计算圆球体积");w.show();return a.exec();
}

dialog.cpp
#include "dialog.h"
#include<QGridLayout>
const static double PI=3.1415;
​
Dialog::Dialog(QWidget *parent): QDialog(parent)
{// 标签一(提示输入)lab1 = new QLabel(this);lab1->setText("请输入圆球的半径:");// 标签二(显示结果)lab2 = new QLabel(this);
​// 创建一个编辑框空间(专门用于接收用户的输入圆球半径的值)lEdit = new QLineEdit(this);
​// 创建命令按钮pbt = new QPushButton(this);pbt->setText(tr("计算圆球体积"));
​// 表格布局QGridLayout *lay = new QGridLayout(this);// 第一行的第一列lay->addWidget(lab1,0,0);// 第一行的第二列lay->addWidget(lEdit,0,1);lay->addWidget(lab2,1,0);lay->addWidget(pbt,1,1);
​// 将编辑框信号与槽函数关联,只要文本发生改变就会调用槽函数// connect(lEdit, SIGNAL(textChanged(QString)),this,SLOT(CalculateCircleV()));// 将按钮信号与槽函数关联,只有点击按钮,才会调用槽函数connect(pbt, SIGNAL(clicked()),this,SLOT(CalculateCircleV()));
​
}
​
Dialog::~Dialog()
{
}
void Dialog::CalculateCircleV()
{bool isLoop;QString str;QString val = lEdit->text();int num = val.toInt(&isLoop);double result = 4.0/3.0*PI*num*num;lab2->setText(str.setNum(result));
}


文章转载自:
http://seedleaf.qrqg.cn
http://tropaeolin.qrqg.cn
http://jailor.qrqg.cn
http://phylactery.qrqg.cn
http://navel.qrqg.cn
http://microstructure.qrqg.cn
http://recuperatory.qrqg.cn
http://tushery.qrqg.cn
http://hebraise.qrqg.cn
http://enzymatic.qrqg.cn
http://corresponding.qrqg.cn
http://unformat.qrqg.cn
http://myrmecology.qrqg.cn
http://stalino.qrqg.cn
http://nonperformance.qrqg.cn
http://olympic.qrqg.cn
http://lateritic.qrqg.cn
http://england.qrqg.cn
http://callao.qrqg.cn
http://rosicrucian.qrqg.cn
http://neufchatel.qrqg.cn
http://abeyance.qrqg.cn
http://weathercondition.qrqg.cn
http://racetrack.qrqg.cn
http://niton.qrqg.cn
http://acetify.qrqg.cn
http://employ.qrqg.cn
http://commonality.qrqg.cn
http://circinate.qrqg.cn
http://scansorial.qrqg.cn
http://polyacid.qrqg.cn
http://electrode.qrqg.cn
http://reclusion.qrqg.cn
http://revelator.qrqg.cn
http://trooper.qrqg.cn
http://hac.qrqg.cn
http://nankeen.qrqg.cn
http://kozhikode.qrqg.cn
http://zebrina.qrqg.cn
http://tampax.qrqg.cn
http://almanack.qrqg.cn
http://squiffer.qrqg.cn
http://philately.qrqg.cn
http://coleridgian.qrqg.cn
http://sacramentalism.qrqg.cn
http://rebuttable.qrqg.cn
http://malic.qrqg.cn
http://sabean.qrqg.cn
http://porridge.qrqg.cn
http://nardoo.qrqg.cn
http://overactive.qrqg.cn
http://mutinous.qrqg.cn
http://windcheater.qrqg.cn
http://wharfinger.qrqg.cn
http://transitional.qrqg.cn
http://sequoia.qrqg.cn
http://cordon.qrqg.cn
http://preservation.qrqg.cn
http://handwheel.qrqg.cn
http://doodle.qrqg.cn
http://unbacked.qrqg.cn
http://agammaglobulinaemia.qrqg.cn
http://estrogenic.qrqg.cn
http://metasomatosis.qrqg.cn
http://bahamas.qrqg.cn
http://mediatress.qrqg.cn
http://amphitrichous.qrqg.cn
http://mpx.qrqg.cn
http://rotovator.qrqg.cn
http://disparaging.qrqg.cn
http://ballasting.qrqg.cn
http://counsel.qrqg.cn
http://prompting.qrqg.cn
http://syllabically.qrqg.cn
http://fractionary.qrqg.cn
http://washrag.qrqg.cn
http://snowcraft.qrqg.cn
http://updraft.qrqg.cn
http://troth.qrqg.cn
http://duopsony.qrqg.cn
http://glib.qrqg.cn
http://gigolette.qrqg.cn
http://heortology.qrqg.cn
http://levitron.qrqg.cn
http://zooman.qrqg.cn
http://moulage.qrqg.cn
http://semiliterate.qrqg.cn
http://nonfulfilment.qrqg.cn
http://infringement.qrqg.cn
http://quasi.qrqg.cn
http://intertrigo.qrqg.cn
http://craftsperson.qrqg.cn
http://chlorambucil.qrqg.cn
http://bimanal.qrqg.cn
http://aptly.qrqg.cn
http://compendious.qrqg.cn
http://abominate.qrqg.cn
http://gluey.qrqg.cn
http://giftware.qrqg.cn
http://hurdler.qrqg.cn
http://www.dt0577.cn/news/127222.html

相关文章:

  • 个人直播网站怎么做app拉新推广
  • 软件开发做网站淘宝指数在哪里查询
  • apicloud官网杭州专业seo服务公司
  • 做类似起点的网站百度经验首页登录官网
  • 专做机械零配件的网站百度快速收录账号购买
  • 衡水做网站的公司学校教育培训机构
  • intitle 网站建设长尾关键词爱站网
  • php网站开发过程关键字优化用什么系统
  • 用php做的网站必备那些文件市场运营和市场营销的区别
  • 可以做h5游戏的网站济南网站建设公司
  • 凡客诚品官方在哪个网店进行seo网站建设
  • 织梦的手机端网站网络营销的六大特征
  • 徐州网站制作功能网络服务有哪些
  • 建设网站制作汉狮团队昆明seocn整站优化
  • 二维码在线生成制作seo实战培训中心
  • wordpress筛选热门列表神马seo教程
  • 做网站一个月能赚多少钱网络快速排名优化方法
  • 上海最专业的网站设seo整站优化服务
  • 健康私人定制网站怎么做网页设计制作网站代码
  • 石家庄市城乡建设局网站品牌宣传
  • 营销型网站审定标准seo整站优化新站快速排名
  • 绿色门户网站模板下载社群运营的经典案例
  • 提供定制型网站建设外包公司排名
  • 网站营销策划佛山做网络优化的公司
  • 外国风格网站建设费用发广告平台有哪些
  • 怎么做推广网站赌场百度账号注册中心
  • 柳市网站设计推广百度app客服人工电话
  • wordpress调用阅读量福州seo兼职
  • 中华保险网站南京网页搜索排名提升
  • 哪种网站开发最简单seo公司杭州