C++学习笔记

1、引用即别名。

#include "stdafx.h"
#include <iostream>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
    int a=5;
    int &b=a;
    cout<<b<<endl;
    getchar();
    return 0;
}

VS中变量名可以是中文。

#include "stdafx.h"
#include <iostream>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
    int 张=5;
    int &王=张;
    cout<<王<<endl;
    getchar();
    return 0;
}
原文地址:https://www.cnblogs.com/wxl845235800/p/11345043.html