Code về file khi có struct bị lỗi về type

Em đang làm về bài tập file ,đề bài là Cho cấu trúc MatHang gồm: Mã hàng (char mah[15]),tên hàng (char ten[30]), số lượng (int sl), đơn giá (double dg).
Hãy viết các hàm sau:
a. Ghi danh sách n mặt hàng vào tệp văn bản
b. Đọc danh sách n mặt hàng từ tệp văn bản.
Khi chạy thì hai lỗi này

[Error] C:\Users\hi\OneDrive\Documents\C-Free\Temp\Untitled1.cpp:11: error: two or more data types in declaration of `doctep'
[Error] C:\Users\hi\OneDrive\Documents\C-Free\Temp\Untitled1.cpp:11: error: new types may not be defined in a return type

Mong mọi người giúp đỡ

#include<iostream.h>
#include<fstream.h>
struct Mathang
{
	char mah[15];
	char ten[30];
	int sl;
	double dg;
}
void doctep(Mathang a[],int n)
{
	fstream file("mathang.txt",ios::in);
	if(!file)
	{
		cout<<"Khong mo dc file";
		exit(1);
	}
	for(int i=0;i<n;i++)
	{
		file>>a[i].mah;
		file>>a[i].ten;
		file>>a[i].sl;
		file>>a[i].dg;
	}
	;
}
void input(Mathang a[],int n)
{
	for(int i=0;i<n;i++)
	{
		cout<<"Nhap thong tin cua san pham:";
	cin.ignore(1);
	
	cout<<"\nNhap ma san pham:";
	cin.getline(a[i].mah,15);
	cout<<"\nNhap ten san pham:";
	cin.getline(a[i].ten,30);
	cout<<"\nNhap so luong:";
	cin>>a[i].sl;
	cout<<"\nNhap don gia :";
	cin>>a[i].dg;
	}
}
void ghitep(Mathang a[],int n)
{
	fstream file("mathang.txt",ios::out);
	if(!file)
	{
		cout<<"Khong mo dc file";
		exit(1);
	} 
	for(int i=0;i<n;i++)
	{
		
	
	file<<a[i].mah<<"\t";
	file<<a[i].ten<<"\t";
	file<<a[i].sl<<"\t";
	file<<a[i].dg<<"\n";
	
	}
	file.close();
}
int main()
{
	Mathang mh[10];
	int n;
	cout<<"Nhap n";cin>>n;
	input(mh,n);
	ghitep(mh,n);
	
}

Vì có 2 hàm doctep trùng tên nhau.
Bạn đảm bảo không có hàm nào trùng tên trên tất cả các tệp mã nguồn.

Em đã bỏ void doctep đi nhưng vẫn gặp phải 2 lỗi này.Anh có thể xem lại giúp em đc ko ạ?
c++

dạ thôi anh ạ ,lỗi là ở struct thiếu dấu ;
E cảm ơn đã giúp đỡ ạ