【C++】动态数组类应用练习
动态数组类应用联系目标:代码:评价
目标:
使用动态数组类,动态分配空间并填入数字
使用对象生成并存放指定范围内的素数
代码:
#include <iostream>
using namespace std;
class Array
{
int *s;
int count;
int length;
public:
Array() : length(0), s(nullptr), count(0){};
void gen(int limit)
{
原创
2022-02-28 22:34:13 ·
417 阅读 ·
0 评论