请高手来看下c++程序,找错误,重谢

来源:百度知道 编辑:UC知道 时间:2024/06/24 15:25:59
//"car.h"
#ifndef _CAR_H
#define _CAR_H
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
class car;
istream &operator>>(istream &stream, car &e);
class car {
private:
string license;
string action;
int number;
public:
car ();
car (string license, string action,int number);
string getlicense() ;
string getaction() ;
int getnumber();
void plusnumber();
friend istream &operator>>(istream &stream, car &c);
};
#endif
//"car.cpp"
#include<iostream>
#include"car.h"
using namespace std;
car::car(string license,string action,int number){
this->license = license;
this->action = action;
this->number =number;
}
car::car(){
number = 0;
}
string car::getlicense (){
return license;
}

strin

能不能看看你报的什么错误啊!

COOLONE was moved 0 times while it is here
QWE-839 was moved 0 times while it is here
TKG-123 was moved 0 times while it is here
UTU-K90 was moved 0 times while it is here
RRR-877 was moved 0 times while it is here
DMS-RJS was moved 0 times while it is here
GHL-GII was moved 0 times while it is here
Sorry PORSCHE, the lot is full
HEAD-DR was moved 0 times while it is here
TUE-87B was moved 0 times while it is here
WEW-GH1 was moved 0 times while it is here
BKE-284 was moved 0 times while it is here
APPLE-1 was moved 0 times while it is here
THE-MAN was moved 0 times while it is here
was moved 0 times while it is here
was moved 0 times while it is here
上面是运行结果,运行没错误啊