0_0_39151700_17726.cpp:20:4: error: expected unqualified-id before '<<' token
20 | map<<char,int>>m;
| ^~
0_0_39151700_17726.cpp: In function 'void get_code(node*)':
0_0_39151700_17726.cpp:24:9: error: 'ret_code' was not declared in this scope; did you mean 'get_code'?
24 | ret_code(root->lchild);
| ^~~~~~~~
| get_code
0_0_39151700_17726.cpp: In function 'void hoffman_tree()':
0_0_39151700_17726.cpp:31:24: error: no matching function for call to 'std::priority_queue<node, std::vector<node>, func>::push(int&)'
31 | pq.push(i);
| ~~~~~~~^~~
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/queue:66,
from .\stdc++.h:157:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_queue.h:738:7: note: candidate: 'void std::priority_queue<_Tp, _Sequence, _Compare>::push(const value_type&) [with _Tp = node; _Sequence = std::vector<node>; _Compare = func; value_type = node]'
738 | push(const value_type& __x)
| ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_queue.h:738:30: note: no known conversion for argument 1 from 'int' to 'const std::priority_queue<node, std::vector<node>, func>::value_type&' {aka 'const node&'}
738 | push(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_queue.h:746:7: note: candidate: 'void std::priority_queue<_Tp, _Sequence, _Compare>::push(value_type&&) [with _Tp = node; _Sequence = std::vector<node>; _Compare = func; value_type = node]'
746 | push(value_type&& __x)
| ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_queue.h:746:25: note: no known conversion for argument 1 from 'int' to 'std::priority_queue<node, std::vector<node>, func>::value_type&&' {aka 'node&&'}
746 | push(value_type&& __x)
| ~~~~~~~~~~~~~^~~
0_0_39151700_17726.cpp:34:29: error: cannot convert 'const __gnu_cxx::__alloc_traits<std::allocator<node>, node>::value_type' {aka 'const node'} to 'int' in initialization
34 | int a=pq.top();
| ~~~~~~^~
| |
| const __gnu_cxx::__alloc_traits<std::allocator<node>, node>::value_type {aka const node}
0_0_39151700_17726.cpp:36:29: error: cannot convert 'const __gnu_cxx::__alloc_traits<std::allocator<node>, node>::value_type' {aka 'const node'} to 'int' in initialization
36 | int b=pq.top();
| ~~~~~~^~
| |
| const __gnu_cxx::__alloc_traits<std::allocator<node>, node>::value_type {aka const node}
0_0_39151700_17726.cpp:42:25: error: 'rchild' was not declared in this scope
42 | tree[n],rchild=&tree[b];
| ^~~~~~
0_0_39151700_17726.cpp:43:24: error: no matching function for call to 'std::priority_queue<node, std::vector<node>, func>::push(int&)'
43 | pq.push(n);
| ~~~~~~~^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_queue.h:738:7: note: candidate: 'void std::priority_queue<_Tp, _Sequence, _Compare>::push(const value_type&) [with _Tp = node; _Sequence = std::vector<node>; _Compare = func; value_type = node]'
738 | push(const value_type& __x)
| ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_queue.h:738:30: note: no known conversion for argument 1 from 'int' to 'const std::priority_queue<node, std::vector<node>, func>::value_type&' {aka 'const node&'}
738 | push(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_queue.h:746:7: note: candidate: 'void std::priority_queue<_Tp, _Sequence, _Compare>::push(value_type&&) [with _Tp = node; _Sequence = std::vector<node>; _Compare = func; value_type = node]'
746 | push(value_type&& __x)
| ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_queue.h:746:25: note: no known conversion for argument 1 from 'int' to 'std::priority_queue<node, std::vector<node>, func>::value_type&&' {aka 'node&&'}
746 | push(value_type&& __x)
| ~~~~~~~~~~~~~^~~
0_0_39151700_17726.cpp:45:19: error: no match for 'operator[]' (operand types are 'node [1000010]' and 'const __gnu_cxx::__alloc_traits<std::allocator<node>, node>::value_type' {aka 'const node'})
45 | root=&tree[pq.top()];
| ^
0_0_39151700_17726.cpp: In function 'void read()':
0_0_39151700_17726.cpp:51:20: error: 'm' was not declared in this scope
51 | for(auto j=m.begin();j!=m.end();j++){
| ^
0_0_39151700_17726.cpp: In function 'int main()':
0_0_39151700_17726.cpp:67:28: error: 'm' was not declared in this scope
67 | if(m.find(s[i])!=m.end){
| ^
0_0_39151700_17726.cpp:86:10: error: 'else' without a previous 'if'
86 | }else{
| ^~~~
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_algobase.h:71,
from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/algorithm:60,
from .\stdc++.h:51:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::__ops::_Iter_comp_iter<_Compare>::operator()(_Iterator1, _Iterator2) [with _Iterator1 = __gnu_cxx::__normal_iterator<node*, std::vector<node> >; _Iterator2 = __gnu_cxx::__normal_iterator<node*, std::vector<node> >; _Compare = func]':
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_heap.h:232:14: required from 'constexpr void std::__adjust_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<node*, vector<node> >; _Distance = long long int; _Tp = node; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<func>]'
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_heap.h:264:25: required from 'constexpr void std::__pop_heap(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare&) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<node*, vector<node> >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<func>]'
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_heap.h:333:19: required from 'constexpr void std::pop_heap(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<node*, vector<node> >; _Compare = func]'
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_queue.h:776:15: required from 'void std::priority_queue<_Tp, _Sequence, _Compare>::pop() [with _Tp = node; _Sequence = std::vector<node>; _Compare = func]'
0_0_39151700_17726.cpp:35:9: required from here
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/predefined_ops.h:158:30: error: no match for call to '(func) (node&, node&)'
158 | { return bool(_M_comp(*__it1, *__it2)); }
| ~~~~~~~^~~~~~~~~~~~~~~~
0_0_39151700_17726.cpp:14:14: note: candidate: 'bool func::operator()(int, int)'
14 | bool operator()(int a,int b){
| ^~~~~~~~
0_0_39151700_17726.cpp:14:29: note: no known conversion for argument 1 from 'node' to 'int'
14 | bool operator()(int a,int b){
| ~~~~^
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::__ops::_Iter_comp_val<_Compare>::operator()(_Iterator, _Value&) [with _Iterator = __gnu_cxx::__normal_iterator<node*, std::vector<node> >; _Value = node; _Compare = func]':
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_heap.h:140:48: required from 'constexpr void std::__push_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare&) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<node*, vector<node> >; _Distance = long long int; _Tp = node; _Compare = __gnu_cxx::__ops::_Iter_comp_val<func>]'
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_heap.h:247:23: required from 'constexpr void std::__adjust_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<node*, vector<node> >; _Distance = long long int; _Tp = node; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<func>]'
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_heap.h:264:25: required from 'constexpr void std::__pop_heap(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare&) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<node*, vector<node> >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<func>]'
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_heap.h:333:19: required from 'constexpr void std::pop_heap(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<node*, vector<node> >; _Compare = func]'
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_queue.h:776:15: required from 'void std::priority_queue<_Tp, _Sequence, _Compare>::pop() [with _Tp = node; _Sequence = std::vector<node>; _Compare = func]'
0_0_39151700_17726.cpp:35:9: required from here
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/predefined_ops.h:196:30: error: no match for call to '(func) (node&, node&)'
|