#include <iostream>
using namespace std;
#include "array.h"
typedef Array<int> iarray;
int main(int, char**) {
const int num_days = 6;
int temperature[num_days] = { 23, 28, 21, 33, 35, 27 };
iarray all_temp(temperature, num_days);
iarray not_too_hot = all_temp;
void remove_hot(iarray&);
remove_hot(not_too_hot);
cout << "Temperature of nice days: " << not_too_hot << endl;
}
void remove_hot(iarray& day_temp) {
const int too_hot = 30;
int num_nice = 0;
int day;
for (day=0; day<day_temp.size(); day++) {
if (day_temp[day] < too_hot)
num_nice++;
}
iarray dummy(num_nice);
num_nice = 0;
for (day=0; day<day_temp.size(); day++) {
if (day_temp[day] < too_hot)
dummy[num_nice++] = day_temp[day];
}
day_temp = dummy;
}