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_15582335_5792.cpp:51:83: error: could not convert 'std::basic_string<char>(((const char*)"0"), (*(const std::allocator<char>*)(& std::allocator<char>())))' from 'std::string {aka std::basic_string<char>}' to 'std::string& {aka std::basic_string<char>&}'
  static string _IntegerAdd(string strA, string strB, string& strCarry = string("0"))
                                                                                   ^
0_0_15582335_5792.cpp: In static member function 'static std::string CPositiveAdder::RealNumAdd(std::string, std::string)':
0_0_15582335_5792.cpp:27:67: error: invalid initialization of non-const reference of type 'std::string& {aka std::basic_string<char>&}' from an rvalue of type 'std::string {aka std::basic_string<char>}'
   string strSumLeft(CPositiveAdder::_IntegerAdd(strALeft, strBLeft));
                                                                   ^
0_0_15582335_5792.cpp:51:16: note: in passing argument 3 of 'static std::string CPositiveAdder::_IntegerAdd(std::string, std::string, std::string&)'
  static string _IntegerAdd(string strA, string strB, string& strCarry = string("0"))
                ^
0_0_15582335_5792.cpp:33:70: error: invalid initialization of non-const reference of type 'std::string& {aka std::basic_string<char>&}' from an rvalue of type 'std::string {aka std::basic_string<char>}'
    strSumLeft = CPositiveAdder::_IntegerAdd(strSumLeft, strCarryRight);
                                                                      ^
0_0_15582335_5792.cpp:51:16: note: in passing argument 3 of 'static std::string CPositiveAdder::_IntegerAdd(std::string, std::string, std::string&)'
  static string _IntegerAdd(string strA, string strB, string& strCarry = string("0"))
                ^


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-24 15:49:02, Gzip enabled