16 lines
327 B
C++
16 lines
327 B
C++
#include <iostream>
|
||
#include <string.h>
|
||
|
||
using std::cout;
|
||
using std::endl;
|
||
|
||
int main()
|
||
{
|
||
int num[8];
|
||
memset(num,1,32); //一个int是4个字节的,8个int是32个字节,所以首先要赋值的长度就不应该为8而是32
|
||
for(int i=0;i<8;i++)
|
||
{
|
||
cout << num[i] << " " << endl;
|
||
}
|
||
return 0;
|
||
} |