求助一个关于类的问题
  • 板块学术版
  • 楼主gongxuanwen
  • 当前回复7
  • 已保存回复7
  • 发布时间2022/11/30 20:47
  • 上次更新2023/10/27 00:54:03
查看原帖
求助一个关于类的问题
577963
gongxuanwen楼主2022/11/30 20:47

这里引用了一个自己写的整型浮点型两用的大数类 PReal\texttt{PReal} 在头文件中,之后定义的时候经常出现 excepted ’)’ before token\texttt{excepted ')' before token} 此类的报错,有木有大佬帮忙看看是啥原因嘞。

另外不知道是不是编译器的原因,会出现编码的问题,虽然报错,但编译却能成功(神奇)。我用的是 Red Panda Dev C++ 6.7.5\texttt{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
*\
2022/11/30 20:47
加载中...