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_38917382_4027.cpp: In function 'std::string getstring(std::string)':
0_0_38917382_4027.cpp:38:40: error: reference to 'sample' is ambiguous
   38 |             int index = s.find_last_of(sample,i);
      |                                        ^~~~~~
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/algorithm:61,
                 from 0_0_38917382_4027.cpp:4:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_algo.h:5915:5: note: candidates are: 'template<class _PopulationIterator, class _SampleIterator, class _Distance, class _UniformRandomBitGenerator> _SampleIterator std::sample(_PopulationIterator, _PopulationIterator, _SampleIterator, _Distance, _UniformRandomBitGenerator&&)'
 5915 |     sample(_PopulationIterator __first, _PopulationIterator __last,
      |     ^~~~~~
0_0_38917382_4027.cpp:15:14: note:                 'const std::string sample'
   15 | const string sample = "+-*/()";
      |              ^~~~~~


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