Language: C++

#error "X"

#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <queue>
#include <map>
using namespace std;
const int INF = 1e9;

struct mail(){
  int time, to, cur, id;
  bool operator<(mail a, mail b){
    if(a.time != b.time) return a.time < b.time;
    return a.to < b.to;
  }
};

int main(){
  int n, m;
  while(cin >> n >> m, n){
    vector< vector<int> > D(n, vector<int>(n, INF));
    vector< vector<bool> > E(n, vector<bool>(n, false));
    for(int i = 0; i < m; ++i){
      int u, v, d;
      cin >> u >> v >> d;
      --u;--v;
      D[u][v] = d;
      D[v][u] = d;
    }
    for(int i = 0; i < n; ++i) D[i][i] = 0;
    for(int k = 0; k < n; ++k){
      for(int i = 0; i < n; ++i){
        for(int j = 0; j < n; ++j){
          D[i][j] = min(D[i][j], D[i][k] + D[k][j]);
        }
      }
    }
    vector< vector<int> > next(n, vector<int>(n, -1));
    for(int i = 0; i < n; ++i){
      for(int j = 0; j < n; ++j){
        int d = INF;
        for(int k = 0; k < n; ++k){
          if(D[i][k] + D[k][j] == D[i][j] && D[i][k] < d){
            next[i][j] = k;
            d = D[i][k];
          }
        }
      }
    }
    int l;
    cin >> l;
    vector<string> name(l);
    map<string, int> M;
    priority_queue<mail> que;
    /*
    for(int i = 0; i < l; ++i){
      int from, to, time;
      cin >> from >> to >> time >> name[i];
      M[name[i]] = i;
      que.push((mail){time, to, from, i});
    }
    */
    vector<int> T(n, 0);
    while(!que.empty()){
      mail x = que.top();
      que.pop();
      int v = next[x.cur][x.to];
      
    }
  }
  return 0;
}



Compiler output:
a.cc:1:2: error: #error "X"
    1 | #error "X"
      |  ^~~~~
a.cc:12:13: error: expected unqualified-id before ')' token
   12 | struct mail(){
      |             ^
a.cc: In function 'int main()':
a.cc:67:12: error: variable 'mail x' has initializer but incomplete type
   67 |       mail x = que.top();
      |            ^
In file included from /usr/include/c++/14/vector:66,
                 from a.cc:4:
/usr/include/c++/14/bits/stl_vector.h: In instantiation of 'std::_Vector_base<_Tp, _Alloc>::~_Vector_base() [with _Tp = mail; _Alloc = std::allocator<mail>]':
/usr/include/c++/14/bits/stl_vector.h:531:7:   required from 'std::priority_queue<_Tp, _Sequence, _Compare>::priority_queue() [with _Seq = std::vector<mail, std::allocator<mail> >; _Requires = void; _Tp = mail; _Sequence = std::vector<mail, std::allocator<mail> >; _Compare = std::less<mail>]'
  531 |       vector() = default;
      |       ^~~~~~
a.cc:56:26:   required from here
   56 |     priority_queue<mail> que;
      |                          ^~~
/usr/include/c++/14/bits/stl_vector.h:369:49: error: invalid use of incomplete type 'struct mail'
  369 |                       _M_impl._M_end_of_storage - _M_impl._M_start);
      |                       ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
a.cc:12:8: note: forward declaration of 'struct mail'
   12 | struct mail(){
      |        ^~~~
/usr/include/c++/14/bits/stl_vector.h: In instantiation of 'void std::vector<_Tp, _Alloc>::pop_back() [with _Tp = mail; _Alloc = std::allocator<mail>]':
/usr/include/c++/14/bits/stl_queue.h:775:12:   required from 'void std::priority_queue<_Tp, _Sequence, _Compare>::pop() [with _Tp = mail; _Sequence = std::vector<mail, std::allocator<mail> >; _Compare = std::less<mail>]'
  775 |         c.pop_back();
      |         ~~~~~~~~~~^~
a.cc:68:14:   required from here
   68 |       que.pop();
      |       ~~~~~~~^~
/usr/include/c++/14/bits/stl_vector.h:1327:25: error: cannot decrement a pointer to incomplete type 'mail'
 1327 |         --this->_M_impl._M_finish;
      |           ~~~~~~~~~~~~~~^~~~~~~~~
In file included from /usr/include/c++/14/bits/move.h:37,
                 from /usr/include/c++/14/bits/exception_ptr.h:41,
                 from /usr/include/c++/14/exception:166,
                 from /usr/include/c++/14/ios:41,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:3:
/usr/include/c++/14/type_traits: In instantiation of 'struct std::is_destructible<mail>':
/usr/include/c++/14/bits/stl_construct.h:188:51:   required from 'void std::_Destroy(_ForwardIterator, _ForwardIterator) [with _ForwardIterator = mail*]'
  188 |       static_assert(is_destructible<_Value_type>::value,
      |                                                   ^~~~~
/usr/include/c++/14/bits/alloc_traits.h:993:20:   required from 'void std::_Destroy(_ForwardIterator, _ForwardIterator, allocator<_T2>&) [with _ForwardIterator = mail*; _Tp = mail]'
  993 |       std::_Destroy(__first, __last);
      |       ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:735:15:   required from 'std::vector<_Tp, _Alloc>::~vector() [with _Tp = mail; _Alloc = std::allocator<mail>]'
  735 |         std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
      |         ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  736 |                       _M_get_Tp_allocator());
      |                       ~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_queue.h:496:11:   required from here
  496 |     class priority_queue
      |           ^~~~~~~~~~~~~~
/usr/include/c++/14/type_traits:1049:52: error: static assertion failed: template argument must be a complete class or an unbounded array
 1049 |       static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
      |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/type_traits:1049:52: note: 'std::__is_complete_or_unbounded<__type_identity<mail> >((std::__type_identity<mail>(), std::__type_identity<mail>()))' evaluates to false
In file included from /usr/include/c++/14/bits/alloc_traits.h:33,
                 from /usr/include/c++/14/ext/alloc_traits.h:34,
                 from /usr/include/c++/14/bits/basic_string.h:39,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/bits/stl_construct.h: In instantiation of 'void std::_Destroy(_ForwardIterator, _ForwardIterator) [with _ForwardIterator = mail*]':
/usr/include/c++/14/bits/alloc_traits.h:993:20:   required from 'void std::_Destroy(_ForwardIterator, _ForwardIterator, allocator<_T2>&) [with _ForwardIterator = mail*; _Tp = mail]'
  993 |       std::_Destroy(__first, __last);
      |       ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:735:15:   required from 'std::vector<_Tp, _Alloc>::~vector() [with _Tp = mail; _Alloc = std::allocator<mail>]'
  735 |         std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
      |         ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  736 |                       _M_get_Tp_allocator());
      |                       ~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_queue.h:496:11:   required from here
  496 |     class priority_queue
      |           ^~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_construct.h:188:51: error: static assertion failed: value type is destructible
  188 |       static_assert(is_destructible<_Value_type>::value,
      |                                                   ^~~~~
/usr/include/c++/14/bits/stl_construct.h:188:51: note: 'std::integral_constant<bool, false>::value' evaluates to false
/usr/include/c++/14/bits/stl_construct.h:195:25: error: invalid use of incomplete type 'std::iterator_traits<mail*>::value_type' {aka 'struct mail'}
  195 |       std::_Destroy_aux<__has_trivial_destructor(_Value_type)>::
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:12:8: note: forward declaration of 'std::iterator_traits<mail*>::value_type' {aka 'struct mail'}
   12 | struct mail(){
      |        ^~~~
In file included from /usr/include/c++/14/string:48:
/usr/include/c++/14/bits/stl_iterator.h: In instantiation of 'typename __gnu_cxx::__normal_iterator<_Iterator, _Container>::difference_type __gnu_cxx::operator-(const __normal_iterator<_Iterator, _Container>&, const __normal_iterator<_Iterator, _Container>&) [with _Iterator = mail*; _Container = std::vector<mail, std::allocator<mail> >; typename __normal_iterator<_Iterator, _Container>::difference_type = long int]':
/usr/include/c++/14/bits/stl_heap.h:328:18:   required from 'void std::pop_heap(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<mail*, vector<mail, allocator<mail> > >; _Compare = less<mail>]'
  328 |       if (__last - __first > 1)
      |           ~~~~~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_queue.h:774:15:   required from 'void std::priority_queue<_Tp, _Sequence, _Compare>::pop() [with _Tp = mail; _Sequence = std::vector<mail, std::allocator<mail> >; _Compare = std::less<mail>]'
  774 |         std::pop_heap(c.begin(), c.end(), comp);
      |         ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:68:14:   required from here
   68 |       que.pop();
      |       ~~~~~~~^~
/usr/include/c++/14/bits/stl_iterator.h:1328:27: error: invalid use of incomplete type 'struct mail'
 1328 |     { return __lhs.base() - __rhs.base(); }
      |              ~~~~~~~~~~~~~^~~~~~~~~~~~~~
a.cc:12:8: note: forward declaration of 'struct mail'
   12 | struct mail(){
      |        ^~~~
/usr/include/c++/14/bits/stl_iterator.h: In instantiation of '__gnu_cxx::__normal_iterator<_Iterator, _Container>& __gnu_cxx::__normal_iterator<_Iterator, _Container>::operator--() [with _Iterator = mail*; _Container = std::vector<mail, std::allocator<mail> >]':
/usr/include/c++/14/bits/stl_heap.h:332:4:   required from 'void std::pop_heap(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<mail*, vector<mail, allocator<mail> > >; _Compare = less<mail>]'
  332 |           --__last;
      |           ^~~~~~~~
/usr/include/c++/14/bits/stl_queue.h:774:15:   required from 'void std::priority_queue<_Tp, _Sequence, _Compare>::pop() [with _Tp = mail; _Sequence = std::vector<mail, std::allocator<mail> >; _Compare = std::less<mail>]'
  774 |         std::pop_heap(c.begin(), c.end(), comp);
      |         ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:68:14:   required from here
   68 |       que.pop();
      |       ~~~~~~~^~
/usr/include/c++/14/bits/stl_iterator.h:1116:11: error: cannot decrement a pointer to incomplete type 'mail'
 1116 |         --_M_current;
      |           ^~~~~~~~~~
In file included from /usr/include/c++/14/bits/stl_algo.h:61,
                 from /usr/include/c++/14/algorithm:61,
                 from a.cc:5:
/usr/include/c++/14/bits/stl_heap.h: In instantiation of 'void std::__pop_heap(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare&) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<mail*, vector<mail, allocator<mail> > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<less<mail> >]':
/usr/include/c++/14/bits/stl_heap.h:333:19:   required from 'void std::pop_heap(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<mail*, vector<mail, allocator<mail> > >; _Compare = less<mail>]'
  333 |           std::__pop_heap(__first, __last, __last, __cmp);
      |           ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_queue.h:774:15:   required from 'void std::priority_queue<_Tp, _Sequence, _Compare>::pop() [with _Tp = mail; _Sequence = std::vector<mail, std::allocator<mail> >; _Compare = std::less<mail>]'
  774 |         std::pop_heap(c.begin(), c.end(), comp);
      |         ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:68:14:   required from here
   68 |       que.pop();
      |       ~~~~~~~^~
/usr/include/c++/14/bits/stl_heap.h:262:18: error: '_ValueType __value' has