INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
• Talk With Other Members
• Be Notified Of Responses
• Keyword Search
Favorite Forums
• Automated Signatures
• Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

#### Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

# Argh! What am I missing??? Function does not take 3 arugments

## Argh! What am I missing??? Function does not take 3 arugments

(OP)
I'm racking my brain to figure this out.. I know its something simple but I need a new set of eyes to figure out what I'm missing?

I'm getting an error C2660: 'drillOneProblem' : function does not take 3 arguments. Help Please!

line is highlighted below

// Drill into problem
void drillOneProblem()
{
int c, r1, r2; // passed-in parameters

// Ask first part of question and display first random number
cout << "\nWhat is " << r1;

// Display sign based on user's answer
switch (c)
{
case '1': cout << " + ";
CorAns = r1 + r2;
break;
case '2': cout << " - ";
CorAns = r1 - r2;
break;
case '3': cout << " * ";
CorAns = r1 * r2;
break;
}
// Finish question and display second random number
cout << r2 << " ? ";
{
cout << "Yes, that is corret. Good job!";
}
else
cout << "No, the correct answer is: " << CorAns << endl << endl;
}

int main()
{
int c; // user's menu choice
int r1, r2; // random numbers

// Get user's choice and validate if out of range

// Continue with program if user doesn't quit
while (c >= 1 && c < SENT)
{
// Generate random numbers
Gen2Rand(r1, r2);

// Display message to show if correct or not correct. If not correct display correct answer
drillOneProblem(c, r1, r2);
// display menu again and ask for menu choice after problem has been processed, repeat until user quits
} return 0;
}

Tiffany

### RE: Argh! What am I missing??? Function does not take 3 arugments

Change

#### CODE

void drillOneProblem()
{
int c, r1, r2; // passed-in parameters 
to

#### CODE

void drillOneProblem(int c, int r1, int r2)
{ 

#### Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

#### Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Close Box

# Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!