qt开发环境

来源:互联网 发布:锐捷客户端mac 编辑:程序博客网 时间:2024/06/18 16:41
#include <QCoreApplication>#include <iostream>using namespace std;int main(int argc, char *argv[]){    QCoreApplication a(argc, argv);    int b = 666;    int&c = b;    int&d = c;    d++;    cout << &b << ' ' << &c << " " << &d <<endl;    cout << d << endl;    int const& e = d;    cout << &e << endl;//    d = 20;//对只读赋值    int const& r = 10;//可以取地址的是左值,不能取地址是右值    cout << r << endl;    int const& f = c + b;    cout << f << endl;//    int m = 0;//引用必须初始化//    int& n;//    n = m;    return a.exec();}

原创粉丝点击