Блог пользователя divyanshuGupta

Автор divyanshuGupta, история, 4 года назад, По-английски

can anyone tell me why does it show that reference is ambiguous on custom invocation of codeforces although it works fine on sublime and when i just change the name of array it works fine .. ... code link...

...thank you

  • Проголосовать: нравится
  • +4
  • Проголосовать: не нравится

»
4 года назад, # |
  Проголосовать: нравится +4 Проголосовать: не нравится

in c++17 you can't name a global variable data. You probably use an older c++ standard locally that's why its works for oyu.

»
4 года назад, # |
Rev. 2   Проголосовать: нравится +7 Проголосовать: не нравится

Because of global namespace pollution (using namespace std;)

Edit: to be more clear, there are several utility function templates defined in the std namespace with the same name (data).