I would like to know, how to loop through a array of int to get its value and set its value. I know how to use the for loop to to get instantly, but I am not sure how it works, when I am using in user created objects and esp using the get set method.
I am totally new to this and have very little guidance from my lectures. I hope you guys can assist to help me. This up to where I have done.
//point.h
class point {
private:
    int x[4];
public:
    int getx();
    void setx();
};  
//point.cpp
class point {
   point::getx(){
      // ??????
   }
   point::setx(){
      // ???????
   }
//main.cpp
 int main(){
     point objPoint;
     objPoint.setx(/* ???? */);
     ???? = objPoint.getx();
 }
 
     
     
    