C++ code issue
Hi! iwrote a c++ simple program for practicing and im having a big issue. In the this simple program, the user set his name and his basketball habilities (between 0 and 100) and then his habilities are compared with the "othi"(the program player) habilities the issue: i used a function to the user set his habilities values, but i cant get this values back to the main function, Could you please tell me how can i make this program work? sorry by my english, thanks #include <iostream> #include <string> using namespace std; //Declaring all the functions void test(int a, int b); int test2(int x); int DATAp(int a, int b, int c, int z); //Player 1 variable declaration string Player1Name=""; int P1JumpQ=0; int P1shootingQ=0; int P1dribleQ=0; ; int main(){ //Player 2 variable declaration string Player2Name="Othi"; int P2JumpQ=75; int P2shootingQ=45; int P2dribleQ=70; int media2=(P2JumpQ+P2shootingQ+P2dribleQ)/3; //input cout<<"set your basketball player habilities\n set a number between 1 to 100\n"; cout<<"name: "; cin>> Player1Name; int media; // Im using a function (DATAp) to input the habilities value cout<< DATAp( P2JumpQ, P2shootingQ, P2dribleQ, media)<<endl; // im trying to test if the habilities value are the same in the main function media=(P1JumpQ+P1shootingQ+P1dribleQ)/3; cout<<"Your drible ability is= "<< P1dribleQ<<endl; cout<<"media provisoria= " <<media<<endl; //functions tests cout<<"the media of your player "<< Player1Name<<" is: "<< test2(media); test(media, media2); } // Cin all the habilities values int DATAp(int a, int b, int c, int d){ //Do while loop, for the user do not set a value greater than 100 do { cout<<"\nJump power (number<=100): "; cin>> a; //if that condition is true, break the loop if (a<100){ break; } }while (a>100); // If THIS while condition is true, restart the loop do{ cout<<"\nShoot