F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_38959849_26616.cpp: In function 'int fun(int&)':
0_0_38959849_26616.cpp:25:98: error: cannot bind non-const lvalue reference of type 'int&' to an rvalue of type 'int'
   25 |         if(num[ind] != '4' && !(ind > 0 && num[ind] == '2' && num[ind--] == '6')) ans += fun(ind + 1);
      |                                                                                              ~~~~^~~
0_0_38959849_26616.cpp:19:14: note:   initializing argument 1 of 'int fun(int&)'
   19 | int fun(int &ind){
      |         ~~~~~^~~
0_0_38959849_26616.cpp: In function 'int main()':
0_0_38959849_26616.cpp:43:30: error: cannot bind non-const lvalue reference of type 'int&' to an rvalue of type 'int'
   43 |                 int bb = fun(0);
      |                              ^
0_0_38959849_26616.cpp:19:14: note:   initializing argument 1 of 'int fun(int&)'
   19 | int fun(int &ind){
      |         ~~~~~^~~
0_0_38959849_26616.cpp:44:36: error: cannot bind non-const lvalue reference of type 'int&' to an rvalue of type 'int'
   44 |                 num = to_string1(a - 1);
      |                                  ~~^~~
0_0_38959849_26616.cpp:10:24: note:   initializing argument 1 of 'std::string to_string1(int&)'
   10 | string to_string1(int &u){
      |                   ~~~~~^
0_0_38959849_26616.cpp:45:30: error: cannot bind non-const lvalue reference of type 'int&' to an rvalue of type 'int'
   45 |                 int aa = fun(0);
      |                              ^
0_0_38959849_26616.cpp:19:14: note:   initializing argument 1 of 'int fun(int&)'
   19 | int fun(int &ind){
      |         ~~~~~^~~


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-23 10:18:42, Gzip enabled