# include
using namespace std;
Enum Wordsize {thirty_two sixty_four};
Enum He {Single, Double, Four};
The class CPU {
Public:
CPU (unsigned hz, Wordsize Wordsize, He He, bool ht) : Hertz (hz), Wordsize (Wordsize), He (He), ht (ht) {};
void show();
Private:
Unsigned hz: 13;
Wordsize Wordsize: 1;
He He: 2;
Bool ht: 1;
};
Void CPU: : show () {
cout<" The frequency of this computer is: "& lt;
Case thirty_two: cout<" This computer word length is: "& lt; <" 32 words "& lt; & lt; Endl;
break;
Case sixty_four: cout<" This computer word length is: "& lt; <" 64 words "& lt;
}
The switch (he) {
Case in use: cout<" This computer auditing is: "& lt; <" Single-core "& lt;
Case Double: cout<" This computer auditing is: "& lt; <" Dual-core "& lt;
Case Four: cout<" This computer auditing is: "& lt; <" Quad-core "& lt;
}
cout<(ht?" Support multithreading ":" does not support multithreading ") & lt;
Int main () {
A CPU (3000, sixty_four, Four, true);
A.s how ();
cout
}
CodePudding user response:
Should not be 13 + 1 + 2 + 1=17 three bytes