main.cpp
来自「此为本书配套光盘.本书主要内容包括:微型计算机基础知识、IBM-PC微型计算机系」· C++ 代码 · 共 27 行
CPP
27 行
// main.cpp
// Calls the external LongRandom function, written in
// assembly language, that returns an unsigned 32-bit
// random integer. Compile in the Large memory model.
#include <iostream.h>
extern "C" unsigned long LongRandom();
const int ARRAY_SIZE = 500;
int main()
{
// Allocate array storage and fill with 32-bit
// unsigned random integers.
unsigned long * rArray = new unsigned long[ARRAY_SIZE];
for(unsigned i = 0; i < ARRAY_SIZE; i++)
{
rArray[i] = LongRandom();
cout << rArray[i] << ',';
}
cout << endl;
return 0;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?