CodePudding user response:
It is as you say, cout output problem of the width of the integer#include
#include
using namespace std;
Int main () {
Cout. Width (10);
Cout. The fill (' * ');
cout <12 & lt;
Int I=3;
cout
}
If the int account for a few bytes of memory, so you cannot be set up, this is the problem that the operating system and compiler
Under Windows int and long is 4 bytes, long long is 8 bytes
Int under Linux system is 4 bytes, long have a plenty of 4 or 8 (different CPU and system), long long is 8 bytes
CodePudding user response:
The compiler is goodUnless the compilers provide command to modify the parameters (such as GCC - XXX XXX can specify the type of bytes), or a corresponding macro definition (such as WIN32 WIN64 such macro may be defined), otherwise there is no way,