Classes

What error is caused by the following code ?
class TemperatureList {
public:
TemperatureList( );
private:
double * list;
int size;
};
void func(Money amount);
[...]
int main
{
TemperatureList list1;
func(list1);
return 0;
}
Choose one answer.

a. double free

b. divide by zero

c. illegal argument

d. no error

Questions by samah74

Showing Answers 1 - 6 of 6 Answers

amithere007

  • May 26th, 2011
 

The function func is taking an object of Money class which is not defined in this scope so that will give a compilation error. It will give the error as "Money' was not declared in this scope ".

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions