摘要:
#include<iostream>#include<iomanip>using namespace std; int main(){ int year; cout << "Enter the year "; cin >> year; int firstDay; cout << "Enter fir 阅读全文
摘要:
引用变量是一种特殊类型的变量,将函数形参声明为此种类型的变量,形参将成为原变量的一个引用(而不是拷贝)。一个引用变量的实质是另一个变量的一个别名,任何对引用变量的改变实际上都会作用到原变量上。 声明一个引用变量应在变量名前放置一个“&”。如:int &refVar; int & refVar; in 阅读全文