I don't understand

I am trying to work on this program for class and have been stuck for weeks. This is what I am supposed to be doing

Step 2: Processing Logic
Using the pseudo code below, write the code that will meet the requirements:
Main Function
Declare the char variables for the 8 digits of the phone number
while true
Call the ReadDials function passing the 8 digits
by reference. ReadDials returns an error code by
value.
If the return value is -5, exit the do while loop
If the error code is -1, display the
error message "ERROR - An invalid character was entered".
If the error code is -2, display the
error message "ERROR - Phone number cannot begin with 0".
If the error code is -3, display the
error message "ERROR - Phone number cannot begin with 555".
If the error code is -4, display the
error message "ERROR - Hyphen is not in the correct position".
Otherwise, call the AcknowledgeCall function
End-While
ReadDials function
Input the first digit
If a Q was entered, return -5.
Input the rest of the phone number
Call the ToDigit function for each of the 7 digits
not for digit 4
If ToDigit returns -1, return -1
If digit 4 is not a hyphen, return -4.
If digit 1 is 0, return -2.
If digits 1 - 3 are 5, return -3
Otherwise, return 0
ToDigit function
Convert the digit to upper case
Use a switch statement to determine if the digit is valid
and convert the letters to digits
If the digit is invalid, return -1.
If the digit is valid, return 0.
AcknowledgeCall function
Display the Phone Number.

Step 3: Create a new project
Create a new project and name it LAB4.
Write your code using the Processing Logic in Step 2 (above). Make sure you save your program.
Step 4: Compile and Execute
a) Compile your program. Eliminate all syntax errors.

b) Build your program and verify the results of the program. Make corrections to the program logic if necessary until the results of the program execution are what you expect.

THIS WHAT I HAVE

#include <iostream>


using namespace std;
int readDials(int, int , int , int , int , int , int , int);
int toDigit (int,int,int,int,int,int,int,int);
int acknowledgeCall (int, int,int,int,int,int,int,int);
int main()
{
int result = 0;
int returnValue = 0;
while (returnValue != -6)
{
returnValue = result;
switch (returnValue)
{
case -1: cout << "ERROR - An invalid character was entered" << endl; break;
case -2: cout << "ERROR - Phone number cannot begin with 0" << endl; break;
case -3: cout << "ERROR - Phone number cannot begin with 555" << endl; break;
case -4: cout << "ERROR - Hyphen is not in the correct position" << endl; break;
case -5: cout << "Good bye!!!" << endl; break;

}
}
return 0;
}

int readDials(int num1&, int num2&, int num3&, int num4&, int num5&, int num6&, int num7&, int num8&)
{
int num1,num2,num3,num4,num5,num6,num7,num8;

cout << "Please enter the first digit or q to exit." << endl;
cin >> num1;
if (num1 == 'Q' || num1 == 'q')
return -5;
cout << "please continue with the remainder of the phone number." << endl;
cin >> num2 >> num3 >> num4 >> num 5 >> num6 >> num7 >> num8;

int result = toDigit(num1, num2, num3, num4, num5, num6, num7, num8);
{
if (result == -1)
return -1;
if resuelt == -2)
return -2;
if (result == -3)
return -3;
if result == -4)
return -4;
else if (result != -1 || result != -2 || result != -3 || result != -4)
return 0;
}




return result;

}

int toDigit (int num1&, int num2&, int num3&, int num4&, int num5&, int num6&, int num7&, int num8&)
{
if (num1 == 5 && num2 == 5 && num3 == 5)
return -3;
if (num1 == 0)
return -2;
if (num4 !='-')
return -4;
switch (num1, num2, num3, num5, num6, num7, num8)
{
case 'a':
cout << "2";
break;
case 'A':
cout << "2";
break;
case 'b':
cout << "2";
break;
case 'B':
cout << "2";
break;
case 'c':
cout << "2";
break;
case 'C':
cout << "2";
break;
case 'd':
cout << "3";
break;
case 'D':
cout << "3";
break;
case 'f':
cout << "3";
break;
case 'F':
cout << "3";
break;
case 'g':
cout << "4";
break;
case 'G':
cout << "4";
break;
case 'h':
cout << "4";
break;
case 'H':
cout << "2";
break;
case 'i':
cout << "4";
break;
case 'I':
cout << "4";
break;
case 'j':
cout << "5";
break;
case 'J':
cout << "5";
break;
case 'k':
cout << "5";
break;
case 'K':
cout << "5";
break;
case 'l':
cout << "5";
break;
case 'L':
cout << "5";
break;
case 'M':
cout << "6";
break;
case 'm':
cout << "6";
break;
case 'o':
cout << "6";
break;
case 'O':
cout << "6";
break;
case 'p':
cout << "7";
break;
case 'P':
cout << "7";
break;
case 'q':
cout << "7";
break;
case 'Q':
cout << "7";
break;
case 'r':
cout << "7";
break;
case 'R':
cout << "7";
break;
case 's':
cout << "7";
break;
case 'S':
cout << "7";
break;
case 't':
cout << "8";
break;
case 'T':
cout << "8";
break;
case 'u':
cout << "8";
break;
case 'U':
cout << "8";
break;
case 'v':
cout << "8";
break;
case 'w':
cout << "9";
break;
case 'W':
cout << "9";
break;
case 'x':
cout << "9";
break;
case 'X':
cout << "9";
break;
case 'y':
cout << "9";
break;
case 'Y':
cout << "9";
break;
case 'z':
cout << "9";
break;
case 'Z':
cout << "9";
break;
return 0;

}




}

void acknowledgeCall (int num1, int num2, int num3, int num4, int num5, int num6, int num7, int num8)
{
cout << "the number is" << num1 << num2 << num3 << num4 << num5 << num6 << num7 << num8;
return 0;
}


Here are my errors.

1>------ Build started: Project: week4new, Configuration: Debug Win32 ------
1>Compiling...
1>week4new.cpp
1>.\week4new.cpp(28) : error C2143: syntax error : missing ',' before '&'
1>.\week4new.cpp(30) : error C2082: redefinition of formal parameter 'num1'
1>.\week4new.cpp(37) : error C2065: 'num' : undeclared identifier
1>.\week4new.cpp(37) : error C2143: syntax error : missing ';' before 'constant'
1>.\week4new.cpp(37) : warning C4552: '>>' : operator has no effect; expected operator with side-effect
1>.\week4new.cpp(43) : error C2061: syntax error : identifier 'resuelt'
1>.\week4new.cpp(43) : error C2059: syntax error : ')'
1>.\week4new.cpp(47) : error C2061: syntax error : identifier 'result'
1>.\week4new.cpp(47) : error C2059: syntax error : ')'
1>.\week4new.cpp(49) : error C2181: illegal else without matching if
1>.\week4new.cpp(60) : error C2143: syntax error : missing ',' before '&'
1>.\week4new.cpp(62) : error C2065: 'num2' : undeclared identifier
1>.\week4new.cpp(62) : error C2065: 'num3' : undeclared identifier
1>.\week4new.cpp(66) : error C2065: 'num4' : undeclared identifier
1>.\week4new.cpp(68) : error C2065: 'num2' : undeclared identifier
1>.\week4new.cpp(68) : error C2065: 'num3' : undeclared identifier
1>.\week4new.cpp(68) : error C2065: 'num5' : undeclared identifier
1>.\week4new.cpp(68) : error C2065: 'num6' : undeclared identifier
1>.\week4new.cpp(68) : error C2065: 'num7' : undeclared identifier
1>.\week4new.cpp(68) : error C2065: 'num8' : undeclared identifier
1>.\week4new.cpp(68) : error C2050: switch expression not integral
1>.\week4new.cpp(221) : error C2556: 'void acknowledgeCall(int,int,int,int,int,int,int,int)' : overloaded function differs only by return type from 'int acknowledgeCall(int,int,int,int,int,int,int,int)'
1> .\week4new.cpp(7) : see declaration of 'acknowledgeCall'
1>.\week4new.cpp(221) : error C2371: 'acknowledgeCall' : redefinition; different basic types
1> .\week4new.cpp(7) : see declaration of 'acknowledgeCall'
1>Build log was saved at "file://c:\Users\Ben\Documents\Visual Studio 2008\Projects\week4new\week4new\Debug\BuildLog.htm"
1>week4new - 22 error(s), 1 warning(s)
Your switch statement within your toDigit() function is incorrect: You can only switch on one value. You will have to call toDigit() for each number entered.

Also, I don't see where you call readDials().

I hope this helps.
i cant read your code easily , maybe you can use <> toolbar and write your code between "["code"]", to get help quickly..., wish you luck
Thanks, I will call it for each number and to hasula I was thanks for telling me how to input the code, I have been trying to figure that out for a while.
Topic archived. No new replies allowed.