29 lines
471 B
C++
29 lines
471 B
C++
#include <iostream>
|
|
#include "Array.hh"
|
|
|
|
int main() {
|
|
Array<int> intlist(1, 99);
|
|
Array<float> strlist(2, 9.9);
|
|
|
|
intlist[4] = 50;
|
|
std::cout << "Intlist" << std::endl;
|
|
for (int i=0; i<intlist.size(); i++) {
|
|
std::cout << i << ": " << intlist[i] << std::endl;
|
|
}
|
|
|
|
strlist[0] = 9;
|
|
strlist[5] = 10;
|
|
std::cout << std::endl;
|
|
|
|
std::cout << "Strlist" << std::endl;
|
|
for (int i=0; i<strlist.size(); i++) {
|
|
std::cout << i << ": " << strlist[i] << std::endl;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|