Subclasses problem

why does this not work?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef ACCOUNTCLASS_H
#define ACCOUNTCLASS_H
#define TESTING
#include <iostream>
#include <string>
#include <fstream>
class AccountClass
{
	protected:
		struct DateFormatsStruct
		{
			std::string sDayOfMonth;
			std::string sDayOfWeek;
			std::string sMonth;
			std::string sMonth_day;
			std::string sYear;
			std::string sMonth_day_year; 
		};

		struct AccountStruct
		{
			float m_dBalance,mdBills,m_dWeekly_Budget,m_dAmount_BillCollect,m_dBill_differece,m_dPoss_billMony;
			float m_dBillMonWeek;
			int m_iNum_bills,m_iBills_payed,m_iBills_left;
			AccountStruct *next;
		};
		AccountStruct *accountPtr;
		DateFormatsStruct *datePtr;
		std::ifstream inFile;
		std::ofstream outFile;
	public:
		AccountClass();
		~AccountClass();
		void DateFormater(std::string sDate);
		void NewAccount();
		bool DownloadAccountInfo();
		bool WriteToNumFile();
		bool WriteToStatement(std::ifstream *inF);
		bool ReadStatement(std::ofstream *outF);
		virtual void Menu();
		void PrintAccountData();
};
#endif 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
#ifndef DEPOSITE_H
#define DEPOSITE_H
#include "AccountClass.h"
class Deposite::public AccountClass
{

	public:
		Deposite(); // will call the menu function below to print the 
		~Deposite();
		void Menu();
		void PaycheckDeposite();
		void NormalDeposite();
};
#endif 

1
2
3
4
5
#include "Deposite.h"
Deposite::Deposite()
{

}

it wont let me define the subclasses constructor or any other function its saying that name followed by :: must be a class or a namespace
Use class Deposite : public AccountClass.
Topic archived. No new replies allowed.