passing a vecotr memebr variable by reference to another class method
===

lets say i have a class called circle with an interface called
circle.h which has the following vector defined in it


i also have a method called readdata but this is defined in another
class called rectangle(rectangle.h is the interface )
i want to call the method readdata in my circle class and pass in my
private member variable which is a vector. How can this be done? is it
correct to pass in a PRIVATE member variable (for class)by reference
to another class. Isn't this defeating the whole purpose of having
private member variables because now i am giving class rectangle
access to my variable since i pass it in by reference. Here is how i
do it(psuedocode)

class.h

private
vector<struct> vect;

public
dataread

class.cpp

method dataread(& vector) //class method to fill up my struct
{
rectangle::readdata(vect);   //i call rectangle readdata method but i
pass in a reference to my memebr variable....is this safe?
}

should i just declare the vector locally(in dataread method) and
assign it to the reference? any help would be greatly appreciated.
Right now it compiles but i have been told this is not good
programming practice
