Em lam 1 cai header nhưng khi chạy chương trình nó bị lỗi C:\BAITAP\phanso.cpp|5|error: expected initializer before ‘using’|. ai co thể giúp em dc không
#include"phanso.h"
#include"songuyen.h"
#include <iostream>
using namespace std;
void nhapPS(PS& x){
cin>> x.tu;
cin>> x.mau;
}
void inPS(PS x){
cout<< x.tu <<"/"<< x.mau;
}
PS cong2PS(PS x, PS y)
{
PS tam;
tam.tu = x.tu*y.mau + x.mau*y.tu;
tam.mau = x.mau*y.mau;
return tam;
}
PS tru2PS(PS x, PS y)
{
PS tam;
tam.tu = x.tu*y.mau - x.mau*y.tu;
tam.mau = x.mau*y.mau;
return tam;
}
PS congPS(PS x, int y)
{
PS tam;
tam.tu = x.tu + x.mau*y.tu;
tam.mau = x.mau*y.mau;
return tam;
}
PS truPS(PS x, int y)
{
PS tam;
tam.tu = x.tu - x.mau*y.tu;
tam.mau = x.mau*y.mau;
return tam;
}
PS tich2PS(PS x, PS y)
{
PS tam;
tam.tu = x.tu*y.tu;
tam.mau = x.mau*y.mau;
return tam;
}
void rutGonPS(PS x)
{
int n=UCLN(x.tu, x.mau);
this.tu=this.tu/n;
this.mau=this.mau/n;
}