关于类的问题
这个程序错哪了,请指教(特别是关于类的)#include "iostream"
using namespace std;
class clock
{
public:
void settime(int newH,int newM,int newS);
void showtime();
private:
int Hour,Minute,Second;
};
v
oid clock::showtime(){
cout<<Hour<<":"<<Minute<<":"<<Second<<endl;
}
void clock::settime(int H,int M,int S)
{
Hour=H;
Mintue=M;
Second=S;
}
clock::clock
void main()
{
clock myclock;
myclock.settime(20,40,26);
myclock.showtime();
}