im new to c++ and i need to pass myboard.board (board is in the class Cboard and it is an array of int) to a function in a class called piece however this is troubling . i need to pass it as pointer os that i could change its value here under is my code. please help :)
main.cpp
#include<iostream>
#include"board.h"
#include "pieces.h"
void main(){
char location[5];
int ov1=0,ov2=0,nv1=0,nv2=0;
int player=0;
int repeat=0;
int correct =0 ;
int boards;
int x=0;
Cboard myboard; // creating object
Cpiece mypiece;
do{
//myboard.getvalues(&new1,&new2);
if(repeat ==0){
myboard.printboard();
}
std::cout<<std::endl;
std::cout<<"please enter location";
std::cin>>location;
myboard.board;// object array which i need to pass
repeat=myboard.setvalues(location,&nv1,&nv2,&ov1,&ov2);
//mypiece.piecechoice(&ov1,&ov2,boards);
std::cout<<player;
mypiece.piecechoice(&ov1,&ov2,&myboard.board); // the function when called
x=x++;
}while (x !=4);
}