我编译后出现4个错误 #includeusing namespace std;enum CPU_Ran{P1=1,P2,P3,P4,P5,P6,P7};class CPU{public:\x05CPU(int x,CPU_Ran y,double z);\x05~CPU(){\x05\x05cout
来源:学生作业帮助网 编辑:作业帮 时间:2024/07/18 21:55:31
![我编译后出现4个错误 #includeusing namespace std;enum CPU_Ran{P1=1,P2,P3,P4,P5,P6,P7};class CPU{public:\x05CPU(int x,CPU_Ran y,double z);\x05~CPU(){\x05\x05cout](/uploads/image/z/6892107-51-7.jpg?t=%E6%88%91%E7%BC%96%E8%AF%91%E5%90%8E%E5%87%BA%E7%8E%B04%E4%B8%AA%E9%94%99%E8%AF%AF+%23includeusing+namespace+std%3Benum+CPU_Ran%7BP1%3D1%2CP2%2CP3%2CP4%2CP5%2CP6%2CP7%7D%3Bclass+CPU%7Bpublic%3A%5Cx05CPU%28int+x%2CCPU_Ran+y%2Cdouble+z%29%3B%5Cx05%7ECPU%28%29%7B%5Cx05%5Cx05cout)
xՑ_KPƿ jF]s.uօ&eh(!,-:gS궋>;{_7Vm '}TUj#d)C䢂$r@IWr:`N9}'`X`݀^G8I".E09NntaJT
c/PiKB+$@9X%wƟ[/ K.)wmɳk(F
HޗѸ^\u">AQ6F,~YNۄIGr5Visd)Gq:R48E\Hpi:9͙KtS2 =b>fJ4o=[d[03gy
//这一句最后要加个{},因为在类中声明了该构造函数,但是没有实现函数体
//加个{}就有了函数实现,就正确啦
我编译后出现4个错误 #includeusing namespace std;enum CPU_Ran{P1=1,P2,P3,P4,P5,P6,P7};class CPU{public:\x05CPU(int x,CPU_Ran y,double z);\x05~CPU(){\x05\x05cout
我编译后出现4个错误
#include
using namespace std;
enum CPU_Ran{P1=1,P2,P3,P4,P5,P6,P7};
class CPU{
public:
\x05CPU(int x,CPU_Ran y,double z);
\x05~CPU(){
\x05\x05cout
我编译后出现4个错误 #includeusing namespace std;enum CPU_Ran{P1=1,P2,P3,P4,P5,P6,P7};class CPU{public:\x05CPU(int x,CPU_Ran y,double z);\x05~CPU(){\x05\x05cout
没有那么多错误啦,就只有一处
CPU::CPU(int x,CPU_Ran y,double z):frequency(x),ran(y),voltage(z){};//这一句最后要加个{},因为在类中声明了该构造函数,但是没有实现函数体
//加个{}就有了函数实现,就正确啦