c2144 c2162 errors, please help

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
 #pragma once
#ifndef CHECKING_H
#define CHECKING_H
#include "account.h"
#include "customer.h"

class Checking : public Account
{
public:
	bool overdraftProtection;
	Checking();
Checking(Customer,double,bool) : Account (double,Customer) {}//The error is here!
	void makeDeposit(float);
	void adjustBalance();
	void view();
};
#endif 


Why am I getting these errors, if necessary I can post the rest of the code.
You think that we shall know what do these error numbers mean?!

You shall pass arguments to the base class constructor call.

Checking(Customer,double,bool) : Account (double,Customer) {}//The error is here!

double and Customer are not arguments.
Last edited on
While it's fairly obvious why you're getting an error there, you should, in the future, post the full error message you receive instead of just the error number.

When you implement a function, and wish to use the parameters (such as forwarding them to a base class,) you need to name the parameters.

Checking(Customer cust, double num, bool t_or_f) : Account(num, cust) {}
Last edited on
Topic archived. No new replies allowed.