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_38567172_20415.cpp: In function 'void calc()':
0_0_38567172_20415.cpp:35:24: error: reference to 'data' is ambiguous
   35 |             dp[i][j] = data[i][j] + temp;
      |                        ^~~~
In file included from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/string:54,
                 from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/bits/locale_classes.h:40,
                 from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/bits/ios_base.h:41,
                 from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/ios:42,
                 from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/ostream:38,
                 from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/iostream:39,
                 from 0_0_38567172_20415.cpp:1:
/usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/bits/range_access.h:319:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(std::initializer_list<_Tp>)'
  319 |     data(initializer_list<_Tp> __il) noexcept
      |     ^~~~
/usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/bits/range_access.h:310:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])'
  310 |     data(_Tp (&__array)[_Nm]) noexcept
      |     ^~~~
/usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/bits/range_access.h:300:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)'
  300 |     data(const _Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
/usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/bits/range_access.h:290:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)'
  290 |     data(_Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
0_0_38567172_20415.cpp:11:5: note:                 'int data [1000][1000]'
   11 | int data[maxm][maxm];
      |     ^~~~
0_0_38567172_20415.cpp: In function 'int main()':
0_0_38567172_20415.cpp:51:22: error: reference to 'data' is ambiguous
   51 |                 cin>>data[i][j];
      |                      ^~~~
In file included from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/string:54,
                 from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/bits/locale_classes.h:40,
                 from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/bits/ios_base.h:41,
                 from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/ios:42,
                 from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/ostream:38,
                 from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/iostream:39,
                 from 0_0_38567172_20415.cpp:1:
/usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/bits/range_access.h:319:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(std::initializer_list<_Tp>)'
  319 |     data(initializer_list<_Tp> __il) noexcept
      |     ^~~~
/usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/bits/range_access.h:310:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])'
  310 |     data(_Tp (&__array)[_Nm]) noexcept
      |     ^~~~
/usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/bits/range_access.h:300:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)'
  300 |     data(const _Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
/usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/bits/range_access.h:290:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)'
  290 |     data(_Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
0_0_38567172_20415.cpp:11:5: note:                 'int data [1000][1000]'
   11 | int data[maxm][maxm];
      |     ^~~~


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-22 23:12:38, Gzip enabled