Advertisement
ItzStaze

c++ compile errors

Oct 21st, 2015
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.18 KB | None | 0 0
  1. main.cpp: In function ‘void serverConnect()’:
  2. main.cpp:21:19: error: ‘struct sockaddr_in’ has no member named ‘sin_add’
  3. serverAddress.sin_add.s_addr = inet_addr("0.0.0.0");
  4. ^
  5. main.cpp:47:5: error: ‘server_connect’ was not declared in this scope
  6. server_connect = false;
  7. ^
  8. main.cpp: In function ‘void sendMessage()’:
  9. main.cpp:57:17: error: no match for ‘operator==’ (operand types are ‘std::string {aka std::basic_string<char>}’ and ‘bool’)
  10. if(stranger == true)
  11. ^
  12. main.cpp:57:17: note: candidates are:
  13. In file included from /usr/include/c++/4.8/bits/locale_facets.h:48:0,
  14. from /usr/include/c++/4.8/bits/basic_ios.h:37,
  15. from /usr/include/c++/4.8/ios:44,
  16. from /usr/include/c++/4.8/ostream:38,
  17. from /usr/include/c++/4.8/iostream:39,
  18. from main.cpp:2:
  19. /usr/include/c++/4.8/bits/streambuf_iterator.h:204:5: note: template<class _CharT, class _Traits> bool std::operator==(const std::istreambuf_iterator<_CharT, _Traits>&, const std::istreambuf_iterator<_CharT, _Traits>&)
  20. operator==(const istreambuf_iterator<_CharT, _Traits>& __a,
  21. ^
  22. /usr/include/c++/4.8/bits/streambuf_iterator.h:204:5: note: template argument deduction/substitution failed:
  23. main.cpp:57:20: note: ‘std::string {aka std::basic_string<char>}’ is not derived from ‘const std::istreambuf_iterator<_CharT, _Traits>’
  24. if(stranger == true)
  25. ^
  26. In file included from /usr/include/c++/4.8/string:52:0,
  27. from /usr/include/c++/4.8/bits/locale_classes.h:40,
  28. from /usr/include/c++/4.8/bits/ios_base.h:41,
  29. from /usr/include/c++/4.8/ios:42,
  30. from /usr/include/c++/4.8/ostream:38,
  31. from /usr/include/c++/4.8/iostream:39,
  32. from main.cpp:2:
  33. /usr/include/c++/4.8/bits/basic_string.h:2519:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const std::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)
  34. operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
  35. ^
  36. /usr/include/c++/4.8/bits/basic_string.h:2519:5: note: template argument deduction/substitution failed:
  37. main.cpp:57:20: note: mismatched types ‘const _CharT*’ and ‘bool’
  38. if(stranger == true)
  39. ^
  40. In file included from /usr/include/c++/4.8/string:52:0,
  41. from /usr/include/c++/4.8/bits/locale_classes.h:40,
  42. from /usr/include/c++/4.8/bits/ios_base.h:41,
  43. from /usr/include/c++/4.8/ios:42,
  44. from /usr/include/c++/4.8/ostream:38,
  45. from /usr/include/c++/4.8/iostream:39,
  46. from main.cpp:2:
  47. /usr/include/c++/4.8/bits/basic_string.h:2507:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const _CharT*, const std::basic_string<_CharT, _Traits, _Alloc>&)
  48. operator==(const _CharT* __lhs,
  49. ^
  50. /usr/include/c++/4.8/bits/basic_string.h:2507:5: note: template argument deduction/substitution failed:
  51. main.cpp:57:20: note: mismatched types ‘const _CharT*’ and ‘std::basic_string<char>’
  52. if(stranger == true)
  53. ^
  54. In file included from /usr/include/c++/4.8/string:52:0,
  55. from /usr/include/c++/4.8/bits/locale_classes.h:40,
  56. from /usr/include/c++/4.8/bits/ios_base.h:41,
  57. from /usr/include/c++/4.8/ios:42,
  58. from /usr/include/c++/4.8/ostream:38,
  59. from /usr/include/c++/4.8/iostream:39,
  60. from main.cpp:2:
  61. /usr/include/c++/4.8/bits/basic_string.h:2493:5: note: template<class _CharT> typename __gnu_cxx::__enable_if<std::__is_char<_Tp>::__value, bool>::__type std::operator==(const std::basic_string<_CharT>&, const std::basic_string<_CharT>&)
  62. operator==(const basic_string<_CharT>& __lhs,
  63. ^
  64. /usr/include/c++/4.8/bits/basic_string.h:2493:5: note: template argument deduction/substitution failed:
  65. main.cpp:57:20: note: mismatched types ‘const std::basic_string<_CharT>’ and ‘bool’
  66. if(stranger == true)
  67. ^
  68. In file included from /usr/include/c++/4.8/string:52:0,
  69. from /usr/include/c++/4.8/bits/locale_classes.h:40,
  70. from /usr/include/c++/4.8/bits/ios_base.h:41,
  71. from /usr/include/c++/4.8/ios:42,
  72. from /usr/include/c++/4.8/ostream:38,
  73. from /usr/include/c++/4.8/iostream:39,
  74. from main.cpp:2:
  75. /usr/include/c++/4.8/bits/basic_string.h:2486: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>&)
  76. operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
  77. ^
  78. /usr/include/c++/4.8/bits/basic_string.h:2486:5: note: template argument deduction/substitution failed:
  79. main.cpp:57:20: note: mismatched types ‘const std::basic_string<_CharT, _Traits, _Alloc>’ and ‘bool’
  80. if(stranger == true)
  81. ^
  82. In file included from /usr/include/c++/4.8/string:41:0,
  83. from /usr/include/c++/4.8/bits/locale_classes.h:40,
  84. from /usr/include/c++/4.8/bits/ios_base.h:41,
  85. from /usr/include/c++/4.8/ios:42,
  86. from /usr/include/c++/4.8/ostream:38,
  87. from /usr/include/c++/4.8/iostream:39,
  88. from main.cpp:2:
  89. /usr/include/c++/4.8/bits/allocator.h:133:5: note: template<class _Tp> bool std::operator==(const std::allocator<_CharT>&, const std::allocator<_CharT>&)
  90. operator==(const allocator<_Tp>&, const allocator<_Tp>&)
  91. ^
  92. /usr/include/c++/4.8/bits/allocator.h:133:5: note: template argument deduction/substitution failed:
  93. main.cpp:57:20: note: ‘std::string {aka std::basic_string<char>}’ is not derived from ‘const std::allocator<_CharT>’
  94. if(stranger == true)
  95. ^
  96. In file included from /usr/include/c++/4.8/string:41:0,
  97. from /usr/include/c++/4.8/bits/locale_classes.h:40,
  98. from /usr/include/c++/4.8/bits/ios_base.h:41,
  99. from /usr/include/c++/4.8/ios:42,
  100. from /usr/include/c++/4.8/ostream:38,
  101. from /usr/include/c++/4.8/iostream:39,
  102. from main.cpp:2:
  103. /usr/include/c++/4.8/bits/allocator.h:128:5: note: template<class _T1, class _T2> bool std::operator==(const std::allocator<_CharT>&, const std::allocator<_T2>&)
  104. operator==(const allocator<_T1>&, const allocator<_T2>&)
  105. ^
  106. /usr/include/c++/4.8/bits/allocator.h:128:5: note: template argument deduction/substitution failed:
  107. main.cpp:57:20: note: ‘std::string {aka std::basic_string<char>}’ is not derived from ‘const std::allocator<_CharT>’
  108. if(stranger == true)
  109. ^
  110. In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
  111. from /usr/include/c++/4.8/bits/char_traits.h:39,
  112. from /usr/include/c++/4.8/ios:40,
  113. from /usr/include/c++/4.8/ostream:38,
  114. from /usr/include/c++/4.8/iostream:39,
  115. from main.cpp:2:
  116. /usr/include/c++/4.8/bits/stl_iterator.h:341:5: note: template<class _IteratorL, class _IteratorR> bool std::operator==(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&)
  117. operator==(const reverse_iterator<_IteratorL>& __x,
  118. ^
  119. /usr/include/c++/4.8/bits/stl_iterator.h:341:5: note: template argument deduction/substitution failed:
  120. main.cpp:57:20: note: ‘std::string {aka std::basic_string<char>}’ is not derived from ‘const std::reverse_iterator<_Iterator>’
  121. if(stranger == true)
  122. ^
  123. In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
  124. from /usr/include/c++/4.8/bits/char_traits.h:39,
  125. from /usr/include/c++/4.8/ios:40,
  126. from /usr/include/c++/4.8/ostream:38,
  127. from /usr/include/c++/4.8/iostream:39,
  128. from main.cpp:2:
  129. /usr/include/c++/4.8/bits/stl_iterator.h:291:5: note: template<class _Iterator> bool std::operator==(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)
  130. operator==(const reverse_iterator<_Iterator>& __x,
  131. ^
  132. /usr/include/c++/4.8/bits/stl_iterator.h:291:5: note: template argument deduction/substitution failed:
  133. main.cpp:57:20: note: ‘std::string {aka std::basic_string<char>}’ is not derived from ‘const std::reverse_iterator<_Iterator>’
  134. if(stranger == true)
  135. ^
  136. In file included from /usr/include/c++/4.8/bits/stl_algobase.h:64:0,
  137. from /usr/include/c++/4.8/bits/char_traits.h:39,
  138. from /usr/include/c++/4.8/ios:40,
  139. from /usr/include/c++/4.8/ostream:38,
  140. from /usr/include/c++/4.8/iostream:39,
  141. from main.cpp:2:
  142. /usr/include/c++/4.8/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>&)
  143. operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
  144. ^
  145. /usr/include/c++/4.8/bits/stl_pair.h:214:5: note: template argument deduction/substitution failed:
  146. main.cpp:57:20: note: ‘std::string {aka std::basic_string<char>}’ is not derived from ‘const std::pair<_T1, _T2>’
  147. if(stranger == true)
  148. ^
  149. In file included from /usr/include/c++/4.8/iosfwd:40:0,
  150. from /usr/include/c++/4.8/ios:38,
  151. from /usr/include/c++/4.8/ostream:38,
  152. from /usr/include/c++/4.8/iostream:39,
  153. from main.cpp:2:
  154. /usr/include/c++/4.8/bits/postypes.h:216:5: note: template<class _StateT> bool std::operator==(const std::fpos<_StateT>&, const std::fpos<_StateT>&)
  155. operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
  156. ^
  157. /usr/include/c++/4.8/bits/postypes.h:216:5: note: template argument deduction/substitution failed:
  158. main.cpp:57:20: note: ‘std::string {aka std::basic_string<char>}’ is not derived from ‘const std::fpos<_StateT>’
  159. if(stranger == true)
  160. ^
  161. In file included from /usr/include/x86_64-linux-gnu/c++/4.8/bits/c++allocator.h:33:0,
  162. from /usr/include/c++/4.8/bits/allocator.h:46,
  163. from /usr/include/c++/4.8/string:41,
  164. from /usr/include/c++/4.8/bits/locale_classes.h:40,
  165. from /usr/include/c++/4.8/bits/ios_base.h:41,
  166. from /usr/include/c++/4.8/ios:42,
  167. from /usr/include/c++/4.8/ostream:38,
  168. from /usr/include/c++/4.8/iostream:39,
  169. from main.cpp:2:
  170. /usr/include/c++/4.8/ext/new_allocator.h:139:5: note: template<class _Tp> bool __gnu_cxx::operator==(const __gnu_cxx::new_allocator<_Tp>&, const __gnu_cxx::new_allocator<_Tp>&)
  171. operator==(const new_allocator<_Tp>&, const new_allocator<_Tp>&)
  172. ^
  173. /usr/include/c++/4.8/ext/new_allocator.h:139:5: note: template argument deduction/substitution failed:
  174. main.cpp:57:20: note: ‘std::string {aka std::basic_string<char>}’ is not derived from ‘const __gnu_cxx::new_allocator<_Tp>’
  175. if(stranger == true)
  176. ^
  177. In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
  178. from /usr/include/c++/4.8/bits/char_traits.h:39,
  179. from /usr/include/c++/4.8/ios:40,
  180. from /usr/include/c++/4.8/ostream:38,
  181. from /usr/include/c++/4.8/iostream:39,
  182. from main.cpp:2:
  183. /usr/include/c++/4.8/bits/stl_iterator.h:811: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>&)
  184. operator==(const __normal_iterator<_Iterator, _Container>& __lhs,
  185. ^
  186. /usr/include/c++/4.8/bits/stl_iterator.h:811:5: note: template argument deduction/substitution failed:
  187. main.cpp:57:20: note: ‘std::string {aka std::basic_string<char>}’ is not derived from ‘const __gnu_cxx::__normal_iterator<_Iterator, _Container>’
  188. if(stranger == true)
  189. ^
  190. In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
  191. from /usr/include/c++/4.8/bits/char_traits.h:39,
  192. from /usr/include/c++/4.8/ios:40,
  193. from /usr/include/c++/4.8/ostream:38,
  194. from /usr/include/c++/4.8/iostream:39,
  195. from main.cpp:2:
  196. /usr/include/c++/4.8/bits/stl_iterator.h:805: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>&)
  197. operator==(const __normal_iterator<_IteratorL, _Container>& __lhs,
  198. ^
  199. /usr/include/c++/4.8/bits/stl_iterator.h:805:5: note: template argument deduction/substitution failed:
  200. main.cpp:57:20: note: ‘std::string {aka std::basic_string<char>}’ is not derived from ‘const __gnu_cxx::__normal_iterator<_IteratorL, _Container>’
  201. if(stranger == true)
  202. ^
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement