Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include "circle.h"
- int main() {
- int n = 3;
- Circle *arr = new Circle[n];
- arr[0] = Circle(5, 0, 0);
- arr[1] = Circle(3, 0, 0);
- arr[2] = Circle(2, 0, 0);
- // cout << arr[0] << endl;
- CircleArray some(arr, n);
- double *len = some.getLenghts();
- for (int i = 0; i < n; i++) {
- cout << len[i] << " ";
- }
- cout << endl;
- cout << "Index test" << endl;
- for (int i = 0; i < n; i++) {
- Circle cur = some[i];
- cout << cur.radius << " " << cur.x << " " << cur.y << endl;
- }
- for (circleIterator it(&some); !it.isEnd(); it++) {
- cout << *it << " ";
- }
- cout << endl;
- for (circleIterator it(&some); !it.isEnd(); it++) {
- it.changeLen((it.getCount()+1)*10);
- }
- for (circleIterator it(&some); !it.isEnd(); it++) {
- cout << *it << " ";
- }
- cout << endl;
- for (int i = 0; i < n; i++) {
- cout << some[i].radius << " ";
- }
- cout << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement