Mikroschema

Taškai: 0

Compile: FAIL

lmio_2004_3e2_mikroschema.cpp:23:5: error: ‘int index’ redeclared as different kind of symbol int index = 0; ^ In file included from /usr/include/c++/5/cstring:42:0, from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:48, from lmio_2004_3e2_mikroschema.cpp:1: /usr/include/string.h:477:1: note: previous declaration ‘const char* index(const char*, int)’ index (const char *__s, int __c) __THROW ^ lmio_2004_3e2_mikroschema.cpp: In function ‘int toplace(char, int)’: lmio_2004_3e2_mikroschema.cpp:76:33: error: cannot resolve overloaded function ‘index’ based on conversion to type ‘std::map<std::pair<char, int>, int>::mapped_type {aka int}’ place[make_pair(c, in)] = index; ^ lmio_2004_3e2_mikroschema.cpp:77:13: error: no match for ‘operator[]’ (operand types are ‘std::map<int, std::pair<char, int> >’ and ‘<unresolved overloaded function type>’) retv[index] = make_pair(c, in); ^ In file included from /usr/include/c++/5/map:61:0, from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:80, from lmio_2004_3e2_mikroschema.cpp:1: /usr/include/c++/5/bits/stl_map.h:474:7: note: candidate: std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = int; _Tp = std::pair<char, int>; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, std::pair<char, int> > >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = std::pair<char, int>; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = int] operator[](const key_type& __k) ^ /usr/include/c++/5/bits/stl_map.h:474:7: note: no known conversion for argument 1 from ‘<unresolved overloaded function type>’ to ‘const key_type& {aka const int&}’ /usr/include/c++/5/bits/stl_map.h:494:7: note: candidate: std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](std::map<_Key, _Tp, _Compare, _Alloc>::key_type&&) [with _Key = int; _Tp = std::pair<char, int>; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, std::pair<char, int> > >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = std::pair<char, int>; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = int] operator[](key_type&& __k) ^ /usr/include/c++/5/bits/stl_map.h:494:7: note: no known conversion for argument 1 from ‘<unresolved overloaded function type>’ to ‘std::map<int, std::pair<char, int> >::key_type&& {aka int&&}’ lmio_2004_3e2_mikroschema.cpp:78:14: error: no post-increment operator for type index++; ^

nr.resulttimemessage