记录详情

Compile Error

/in/foo.cc:40:24: error: 'string' does not name a type
 HugeInt::HugeInt(const string &number)
                        ^~~~~~
/in/foo.cc:40:1: error: prototype for 'HugeInt::HugeInt(const int&)' does not match any in class 'HugeInt'
 HugeInt::HugeInt(const string &number)
 ^~~~~~~
/in/foo.cc:6:7: error: candidates are: constexpr HugeInt::HugeInt(HugeInt&&)
 class HugeInt
       ^~~~~~~
/in/foo.cc:6:7: error:                 constexpr HugeInt::HugeInt(const HugeInt&)
/in/foo.cc:13:2: error:                 HugeInt::HugeInt(const string&)
  HugeInt(const std::string&);
  ^~~~~~~
/in/foo.cc:30:1: error:                 HugeInt::HugeInt(long int)
 HugeInt::HugeInt( long value)
 ^~~~~~~
/in/foo.cc:70:34: error: 'string' does not name a type
 HugeInt HugeInt::operator+(const string& op2)const
                                  ^~~~~~
/in/foo.cc:70:9: error: prototype for 'HugeInt HugeInt::operator+(const int&) const' does not match any in class 'HugeInt'
 HugeInt HugeInt::operator+(const string& op2)const
         ^~~~~~~
/in/foo.cc:16:10: error: candidates are: HugeInt HugeInt::operator+(const string&) const
  HugeInt operator+(const std::string &)const;
          ^~~~~~~~
/in/foo.cc:66:9: error:                 HugeInt HugeInt::operator+(int) const
 HugeInt HugeInt::operator+(int op2)const
         ^~~~~~~
/in/foo.cc:49:9: error:                 HugeInt HugeInt::operator+(const HugeInt&) const
 HugeInt HugeInt::operator+(const HugeInt &op2)const
         ^~~~~~~
/in/foo.cc:95:34: error: 'string' does not name a type
 HugeInt HugeInt::operator-(const string& op2)const
                                  ^~~~~~
/in/foo.cc:95:9: error: prototype for 'HugeInt HugeInt::operator-(const int&) const' does not match any in class 'HugeInt'
 HugeInt HugeInt::operator-(const string& op2)const
         ^~~~~~~
/in/foo.cc:19:10: error: candidates are: HugeInt HugeInt::operator-(const string&) const
  HugeInt operator-(const std::string&)const;
          ^~~~~~~~
/in/foo.cc:91:9: error:                 HugeInt HugeInt::operator-(int) const
 HugeInt HugeInt::operator-(int op2)const
         ^~~~~~~
/in/foo.cc:74:9: error:                 HugeInt HugeInt::operator-(const HugeInt&) const
 HugeInt HugeInt::operator-(const HugeInt& op2)const
         ^~~~~~~
/in/foo.cc:137:34: error: 'string' does not name a type
 HugeInt HugeInt::operator*(const string& op2)const
                                  ^~~~~~
/in/foo.cc:137:9: error: prototype for 'HugeInt HugeInt::operator*(const int&) const' does not match any in class 'HugeInt'
 HugeInt HugeInt::operator*(const string& op2)const
         ^~~~~~~
/in/foo.cc:22:10: error: candidates are: HugeInt HugeInt::operator*(const string&) const
  HugeInt operator*(const std::string&)const;
          ^~~~~~~~
/in/foo.cc:133:9: error:                 HugeInt HugeInt::operator*(int) const
 HugeInt HugeInt::operator*(int op2)const
         ^~~~~~~
/in/foo.cc:99:9: error:                 HugeInt HugeInt::operator*(const HugeInt&) const
 HugeInt HugeInt::operator*(const HugeInt& op2)const
         ^~~~~~~
/in/foo.cc:141:1: error: 'ostream' does not name a type
 ostream& operator<<(ostream& output, const HugeInt& num)
 ^~~~~~~
/in/foo.cc:152:1: error: 'istream' does not name a type
 istream& operator>>(istream& input,  HugeInt& num)
 ^~~~~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:193:2: error: 'cin' was not declared in this scope
  cin >> a;
  ^~~
/in/foo.cc:193:2: note: suggested alternative:
In file included from /in/foo.cc:4:0:
/usr/include/c++/6/iostream:60:18: note:   'std::cin'
   extern istream cin;  /// Linked to standard input
                  ^~~
/in/foo.cc:195:2: error: 'cout' was not declared in this scope
  cout <<"\n"<< a + b<<"\n";
  ^~~~
/in/foo.cc:195:2: note: suggested alternative:
In file included from /in/foo.cc:4:0:
/usr/include/c++/6/iostream:61:18: note:   'std::cout'
   extern ostream cout;  /// Linked to standard output
                  ^~~~

信息

递交者
类型
自测
题目
P1002 10.9_HugeInt
语言
C++
递交时间
2020-03-11 19:29:29
评测时间
2020-03-11 19:29:29
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes