<分区>
标题:
#include <unordered_map>
#include "O.h"
#include "P.h"
using namespace std;
class O{
public:
O();
unordered_map<int,P>* X();
unordered_map<int,P>* Y();
private:
unordered_map<int,P>* b;
unordered_map<int,P>* a;
};
来源:
#include "O.h"
#include "P.h"
#include <unordered_map>
using namespace std;
O::O(){
a= new unordered_map<int,P>();
b= new unordered_map<int,P>();
}
unordered_map<int,P>* O::X(){
return b;
}
unordered_map<int,P>* O::Y(){
return a;
}
错误是:
1>O.cpp(76): error : return value type does not match the function type 1> return b;
1>O.cpp(80): error : return value type does not match the function type 1> return a;
我要疯狂地尝试调试它....
编辑:英特尔编译器 v13