这里引用了一个自己写的整型浮点型两用的大数类 PReal 在头文件中,之后定义的时候经常出现 excepted ’)’ before token 此类的报错,有木有大佬帮忙看看是啥原因嘞。
另外不知道是不是编译器的原因,会出现编码的问题,虽然报错,但编译却能成功(神奇)。我用的是 Red Panda Dev C++ 6.7.5。
\\报错代码
#pragma once
#include <iostream>
#include <vector>
#include "PReal.hpp" //4行
using std::istream;
using std::ostream;
using std::string;
using std::vector;
class PFrac
{
public:
PFrac();
PFrac(*PReal,*PReal); //13行
PFrac(pair<*PReal,*PReal>); //14行
protected:
PReal numerator; //16行
PReal denominator; //17行
bool tag;
private:
};
\*报错
4行21列 [Error] failure to convert gbk to UTF-8
13行14列 [Error] expected ')' before ',' token
14行12列 [Error] expected ')' before '<' token
16行2列 [Error] 'PReal' does not name a type
17行2列 [Error] 'PReal' does not name a type
*\