foo.cpp:4:7: error: reference to 'max' is ambiguous
int f[max];
^
foo.cpp:3:11: note: candidates are: const int max
const int max= 1010;
^
In file included from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/char_traits.h:39:0,
from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/ios:40,
from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/ostream:38,
from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/iostream:39,
from foo.cpp:1:
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_algobase.h:261:5: note: template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare)
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
^
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_algobase.h:217:5: note: template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&)
max(const _Tp& __a, const _Tp& __b)
^
foo.cpp: In function 'int main()':
foo.cpp:8:19: error: 'scanf' was not declared in this scope
scanf("%d", &n);
^
foo.cpp:9:5: error: 'f' was not declared in this scope
f[1] = 1;
^
foo.cpp:15:22: error: 'printf' was not declared in this scope
printf("%d", f[n]);
^