divyanshuGupta's blog

By divyanshuGupta, history, 4 years ago, In English

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

  • Vote: I like it
  • +4
  • Vote: I do not like it

| Write comment?
»
4 years ago, # |
  Vote: I like it +4 Vote: I do not like it

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 years ago, # |
Rev. 2   Vote: I like it +7 Vote: I do not like it

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).