/ Vijos /

记录详情

Compile Error

foo.cpp: In function 'void pow1(BigInt, BigInt)':
foo.cpp:194:12: error: return-statement with a value, in function returning 'void' [-fpermissive]
     return a;
            ^
foo.cpp: In function 'int main()':
foo.cpp:202:40: error: no matching function for call to 'BigInt::BigInt(std::basic_string<char>)'
     N=BigInt(num.substr(num.length()-1));
                                        ^
foo.cpp:202:40: note: candidates are:
foo.cpp:19:5: note: BigInt::BigInt(const char*)
     BigInt(const char *num){*this=num;}
     ^
foo.cpp:19:5: note:   no known conversion for argument 1 from 'std::basic_string<char>' to 'const char*'
foo.cpp:18:5: note: BigInt::BigInt(int)
     BigInt(int num){*this=num;}
     ^
foo.cpp:18:5: note:   no known conversion for argument 1 from 'std::basic_string<char>' to 'int'
foo.cpp:14:5: note: BigInt::BigInt()
     BigInt (){
     ^
foo.cpp:14:5: note:   candidate expects 0 arguments, 1 provided
foo.cpp:11:8: note: constexpr BigInt::BigInt(const BigInt&)
 struct BigInt{
        ^
foo.cpp:11:8: note:   no known conversion for argument 1 from 'std::basic_string<char>' to 'const BigInt&'
foo.cpp:11:8: note: constexpr BigInt::BigInt(BigInt&&)
foo.cpp:11:8: note:   no known conversion for argument 1 from 'std::basic_string<char>' to 'BigInt&&'
foo.cpp:215:10: error: no match for 'operator=' (operand types are 'BigInt' and 'std::basic_string<char>')
         N=num.substr(num.length()-i);
          ^
foo.cpp:215:10: note: candidates are:
foo.cpp:54:12: note: BigInt BigInt::operator=(int)
     BigInt operator = (const int num){
            ^
foo.cpp:54:12: note:   no known conversion for argument 1 from 'std::basic_string<char>' to 'int'
foo.cpp:60:12: note: BigInt BigInt::operator=(const char*)
     BigInt operator = (const char *num){
            ^
foo.cpp:60:12: note:   no known conversion for argument 1 from 'std::basic_string<char>' to 'const char*'
foo.cpp:11:8: note: BigInt& BigInt::operator=(const BigInt&)
 struct BigInt{
        ^
foo.cpp:11:8: note:   no known conversion for argument 1 from 'std::basic_string<char>' to 'const BigInt&'
foo.cpp:11:8: note: BigInt& BigInt::operator=(BigInt&&)
foo.cpp:11:8: note:   no known conversion for argument 1 from 'std::basic_string<char>' to 'BigInt&&'
foo.cpp:216:47: error: conversion from 'void' to non-scalar type 'BigInt' requested
         BigInt mod = pow1(BigInt(10),BigInt(i));
                                               ^
foo.cpp:217:25: error: no match for 'operator%' (operand types are 'void' and 'BigInt')
         mul=pow1(N,loop)%mod;
                         ^
foo.cpp:222:9: error: expected primary-expression before 'while'
         while(!judge(N)){
         ^
foo.cpp:222:9: error: expected ';' before 'while'

信息

递交者
类型
递交
题目
P1032 循环
语言
C++
递交时间
2016-10-31 23:21:31
评测时间
2016-10-31 23:21:32
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes