# How can I make this function work for 100 objects(c++)?

A

#### aj_23

##### Guest
So I have a program that shows the numbers in a text file of each object, the problem is that the original program is with only 6 objects, which I found preety easy, but now I have to change it to work with 100 objects. I tried using a for loop but it only showed me the first object. I don't have much experience programming and have tried other ways but none of them work. Anyways, here's the function:

void Circle::writeAll(Circle circle, int &count) {
if (count == 0) {
cout << "No circles in file. " << endl << endl;
};
if (count == 1 || count == 2 || count == 3 || count == 4 || count == 5 || count == 6) {
cout << " Radius: " << circle.getRadius() << "; Center(x): " << circle.getCenterx() << "; Center : " << circle.getCentery() << endl;
};
if (count == 2 || count == 3 || count == 4 || count == 5 || count == 6) {
cout << " Radius: " << circle.getRadius() << "; Center(x): " << circle.getCenterx() << "; Center : " << circle.getCentery() << endl;
};
if (count == 3 || count == 4 || count == 5 || count == 6) {
cout << " Radius: " << circle.getRadius() << "; Center(x): " << circle.getCenterx() << "; Centery : " << circle.getCentery() << endl;
};
if (count == 4 || count == 5 || count == 6){
cout << " Radio: " << circle.getRadius() << "; Center(x): " << circle.getCenterx() << "; Center : " << circle.getCentery() << endl;
};
if (count == 5 || count == 6){
cout << " Radius: " << circle.getRadius() << "; Center(x): " << circle.getCenterx() << "; Center : " << circle.getCentery() << endl;
};
if (count == 6){
cout << " Radio: " << circle.getRadius() << "; Center(x): " << circle.getCenterx() << "; Center : " << circle.getCentery() << endl;
};
cout << endl;

};