谁能帮我看看啊?关于 运算符重载的问题
#ifndef PH_H#define PH_H
#include <iostream>
using std::istream;
using std::ostream;
#include <string>
using std::string;
class AM
{
friend ostream& operator<<(ostream &,const AM &);
friend istream& operator>>(istream &,AM &);
private:
string a;
};
#endif
#include <iomanip>
using std::setw;
#include "ph.h"
ostream &operator<<(ostream &put,AM &l)
{
put<<l.a<<endl;
return put;
}
istream &operator>>(istream &get,AM &l)
{
get.ignore();
get>>setw(3)>>l.a;
return get;
}
#include <iostream>
using std::cin;
using std::cout;
using std::endl;
#include "ph.h"
int main()
{
AM ha;
cin>>ha;
cout<<ha<<endl;
return 0;
}
结果却是::\c++\microsoft visual studio\myprojects\dfgdf\df.cpp(21) : fatal error C1083: Cannot open include file: 'ph.h': No such file or directory
???