两个值传递给一个void函数的问题,请同志们给看一下
#include <iostream>using namespace std;
void time(int);
int main()
{
int hours,minutes;
cout<<"enter the number of hours : ";
cin>>hours;
cout<<endl;
cout<<"enter the number of minutes : ";
cin>>minutes;
cout<<endl;
time(hours),time(minutes);
system("pause");
return 0;
}
void time(int sys)
{
cout<<"time: "<<sys<<endl;
}
本来是最后生成time: 9:28但是我这个却生成了time: 9 time : 28请各位给看看,不要笑我才学的,