I'm getting a lot of errors on this code and I don't really know what this one means. Yes my code is probably all over the place but just bare with me. Could anyone tell me why this error is happening?
Well what should I do about it? Most of the code was given to my class by the professor and we had to go off what he gave us and that part was already there soooo. Idk what id have to do lol
The Errors:
homework6.cc: In constructor ‘City::City()’:
homework6.cc:25:27: error: invalid use of incomplete type ‘struct Queue’
homework6.cc:13:7: error: forward declaration of ‘struct Queue’
homework6.cc: In member function ‘void City::neighbor(City*)’:
homework6.cc:27:30: error: invalid use of incomplete type ‘struct Queue’
homework6.cc:13:7: error: forward declaration of ‘struct Queue’
homework6.cc: In member function ‘City* City::next()’:
homework6.cc:28:35: error: invalid use of incomplete type ‘struct Queue’
homework6.cc:13:7: error: forward declaration of ‘struct Queue’
homework6.cc: In destructor ‘City::~City()’:
homework6.cc:39:21: warning: possible problem detected in invocation of delete operator: [enabled by default]
homework6.cc:39:21: warning: invalid use of incomplete type ‘struct Queue’ [enabled by default]
homework6.cc:13:7: warning: forward declaration of ‘struct Queue’ [enabled by default]
homework6.cc:39:21: note: neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined
homework6.cc:39:36: error: no match for ‘operator!=’ in ‘((City*)this)->City::name != 0’
homework6.cc:39:36: note: candidates are:
/usr/include/c++/4.6/bits/postypes.h:223:5: note: template<class _StateT> bool std::operator!=(const std::fpos<_StateT>&, const std::fpos<_StateT>&)
/usr/include/c++/4.6/bits/stl_pair.h:214:5: note: template<class _T1, class _T2> bool std::operator!=(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)
/usr/include/c++/4.6/bits/stl_iterator.h:297:5: note: template<class _Iterator> bool std::operator!=(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)
/usr/include/c++/4.6/bits/stl_iterator.h:347:5: note: template<class _IteratorL, class _IteratorR> bool std::operator!=(const std::reverse_iterator<_IteratorL>&, const std::reverse_iterator<_IteratorR>&)
/usr/include/c++/4.6/bits/allocator.h:132:5: note: template<class _T1, class _T2> bool std::operator!=(const std::allocator<_T1>&, const std::allocator<_T2>&)
/usr/include/c++/4.6/bits/allocator.h:137:5: note: template<class _Tp> bool std::operator!=(const std::allocator<_Tp1>&, const std::allocator<_Tp1>&)
/usr/include/c++/4.6/bits/basic_string.h:2473:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator!=(const std::basic_string<_CharT, _Traits, _Alloc>&, const std::basic_string<_CharT, _Traits, _Alloc>&)
/usr/include/c++/4.6/bits/basic_string.h:2485:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator!=(const _CharT*, const std::basic_string<_CharT, _Traits, _Alloc>&)
/usr/include/c++/4.6/bits/basic_string.h:2497:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator!=(const std::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)
/usr/include/c++/4.6/bits/streambuf_iterator.h:200:5: note: template<class _CharT, class _Traits> bool std::operator!=(const std::istreambuf_iterator<_CharT, _Traits>&, const std::istreambuf_iterator<_CharT, _Traits>&)
/usr/include/c++/4.6/ext/new_allocator.h:128:5: note: template<class _Tp> bool __gnu_cxx::operator!=(const __gnu_cxx::new_allocator<_Tp>&, const __gnu_cxx::new_allocator<_Tp>&)
/usr/include/c++/4.6/bits/stl_iterator.h:817:5: note: template<class _Iterator, class _Container> bool __gnu_cxx::operator!=(const __gnu_cxx::__normal_iterator<_Iterator, _Container>&, const __gnu_cxx::__normal_iterator<_Iterator, _Container>&)
/usr/include/c++/4.6/bits/stl_iterator.h:811:5: note: template<class _IteratorL, class _IteratorR, class _Container> bool __gnu_cxx::operator!=(const __gnu_cxx::__normal_iterator<_IteratorL, _Container>&, const __gnu_cxx::__normal_iterator<_IteratorR, _Container>&)
homework6.cc:39:49: error: type ‘std::string {aka struct std::basic_string<char>}’ argument given to ‘delete’, expected pointer
homework6.cc: In function ‘int main(int, char**)’:
homework6.cc:21:10: error: ‘bool City::mark’ is private
homework6.cc:159:19: error: within this context