hi. im trying to make a loop that will end when the user types in 8 numbers for the telephone number. a function will read in the telephone number itself and the loop will call that function. the function has to send back the string either using a reference parameter or by returning a value. im not sure how to do this but this is what i have so far.
here is the main program:
here is the function:
here is the main program:
int main()
{
string telephone;
for (int x = 0; x < telephone.length(); x++) {
readoriginalnumber();
}
here is the function:
string readoriginalnumber () {
string telephone;
cout<< "Enter your telephone number" << endl;
cin>> telephone;
cout<< endl << telephone << " is your original number" << endl;
return telephone;
}