Advertisement
Guest User

Compile error compiling C++

a guest
Sep 20th, 2013
473
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.83 KB | None | 0 0
  1. [matthijs@localhost TiRG_RAW_20110219]$ g++ tirg_raw.cpp
  2. tirg_raw.cpp: In function ‘int main()’:
  3. tirg_raw.cpp:9:21: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
  4. char *picName = "222t.raw";
  5. ^
  6. In file included from /usr/include/c++/4.8.1/vector:64:0,
  7. from trg.hpp:4,
  8. from tirg_raw.cpp:2:
  9. /usr/include/c++/4.8.1/bits/stl_vector.h: In instantiation of ‘void std::vector<_Tp, _Alloc>::_M_assign_dispatch(_Integer, _Integer, std::__true_type) [with _Integer = int; _Tp = std::vector<unsigned char>; _Alloc = std::allocator<std::vector<unsigned char> >]’:
  10. /usr/include/c++/4.8.1/bits/stl_vector.h:507:51: required from ‘void std::vector<_Tp, _Alloc>::assign(_InputIterator, _InputIterator) [with _InputIterator = int; _Tp = std::vector<unsigned char>; _Alloc = std::allocator<std::vector<unsigned char> >]’
  11. trg.hpp:47:20: required from here
  12. /usr/include/c++/4.8.1/bits/stl_vector.h:1240:36: error: no matching function for call to ‘std::vector<std::vector<unsigned char> >::_M_fill_assign(int&, int&)’
  13. { _M_fill_assign(__n, __val); }
  14. ^
  15. /usr/include/c++/4.8.1/bits/stl_vector.h:1240:36: note: candidate is:
  16. In file included from /usr/include/c++/4.8.1/vector:69:0,
  17. from trg.hpp:4,
  18. from tirg_raw.cpp:2:
  19. /usr/include/c++/4.8.1/bits/vector.tcc:218:5: note: void std::vector<_Tp, _Alloc>::_M_fill_assign(std::size_t, const value_type&) [with _Tp = std::vector<unsigned char>; _Alloc = std::allocator<std::vector<unsigned char> >; std::size_t = long unsigned int; std::vector<_Tp, _Alloc>::value_type = std::vector<unsigned char>]
  20. vector<_Tp, _Alloc>::
  21. ^
  22. /usr/include/c++/4.8.1/bits/vector.tcc:218:5: note: no known conversion for argument 2 from ‘int’ to ‘const value_type& {aka const std::vector<unsigned char>&}’
  23. In file included from /usr/include/c++/4.8.1/vector:64:0,
  24. from trg.hpp:4,
  25. from tirg_raw.cpp:2:
  26. /usr/include/c++/4.8.1/bits/stl_vector.h: In instantiation of ‘void std::vector<_Tp, _Alloc>::_M_assign_dispatch(_Integer, _Integer, std::__true_type) [with _Integer = int; _Tp = std::vector<short int>; _Alloc = std::allocator<std::vector<short int> >]’:
  27. /usr/include/c++/4.8.1/bits/stl_vector.h:507:51: required from ‘void std::vector<_Tp, _Alloc>::assign(_InputIterator, _InputIterator) [with _InputIterator = int; _Tp = std::vector<short int>; _Alloc = std::allocator<std::vector<short int> >]’
  28. trg.hpp:148:26: required from here
  29. /usr/include/c++/4.8.1/bits/stl_vector.h:1240:36: error: no matching function for call to ‘std::vector<std::vector<short int> >::_M_fill_assign(int&, int&)’
  30. { _M_fill_assign(__n, __val); }
  31. ^
  32. /usr/include/c++/4.8.1/bits/stl_vector.h:1240:36: note: candidate is:
  33. In file included from /usr/include/c++/4.8.1/vector:69:0,
  34. from trg.hpp:4,
  35. from tirg_raw.cpp:2:
  36. /usr/include/c++/4.8.1/bits/vector.tcc:218:5: note: void std::vector<_Tp, _Alloc>::_M_fill_assign(std::size_t, const value_type&) [with _Tp = std::vector<short int>; _Alloc = std::allocator<std::vector<short int> >; std::size_t = long unsigned int; std::vector<_Tp, _Alloc>::value_type = std::vector<short int>]
  37. vector<_Tp, _Alloc>::
  38. ^
  39. /usr/include/c++/4.8.1/bits/vector.tcc:218:5: note: no known conversion for argument 2 from ‘int’ to ‘const value_type& {aka const std::vector<short int>&}’
  40. In file included from /usr/include/c++/4.8.1/vector:64:0,
  41. from trg.hpp:4,
  42. from tirg_raw.cpp:2:
  43. /usr/include/c++/4.8.1/bits/stl_vector.h: In instantiation of ‘void std::vector<_Tp, _Alloc>::_M_initialize_dispatch(_Integer, _Integer, std::__true_type) [with _Integer = int; _Tp = std::vector<int>; _Alloc = std::allocator<std::vector<int> >]’:
  44. /usr/include/c++/4.8.1/bits/stl_vector.h:404:55: required from ‘std::vector<_Tp, _Alloc>::vector(_InputIterator, _InputIterator, const allocator_type&) [with _InputIterator = int; _Tp = std::vector<int>; _Alloc = std::allocator<std::vector<int> >; std::vector<_Tp, _Alloc>::allocator_type = std::allocator<std::vector<int> >]’
  45. trg.hpp:150:56: required from here
  46. /usr/include/c++/4.8.1/bits/stl_vector.h:1166:59: error: no matching function for call to ‘std::vector<std::vector<int> >::_M_fill_initialize(std::vector<std::vector<int> >::size_type, int&)’
  47. _M_fill_initialize(static_cast<size_type>(__n), __value);
  48. ^
  49. /usr/include/c++/4.8.1/bits/stl_vector.h:1166:59: note: candidate is:
  50. /usr/include/c++/4.8.1/bits/stl_vector.h:1212:7: note: void std::vector<_Tp, _Alloc>::_M_fill_initialize(std::vector<_Tp, _Alloc>::size_type, const value_type&) [with _Tp = std::vector<int>; _Alloc = std::allocator<std::vector<int> >; std::vector<_Tp, _Alloc>::size_type = long unsigned int; std::vector<_Tp, _Alloc>::value_type = std::vector<int>]
  51. _M_fill_initialize(size_type __n, const value_type& __value)
  52. ^
  53. /usr/include/c++/4.8.1/bits/stl_vector.h:1212:7: note: no known conversion for argument 2 from ‘int’ to ‘const value_type& {aka const std::vector<int>&}’
  54. /usr/include/c++/4.8.1/bits/stl_vector.h: In instantiation of ‘void std::vector<_Tp, _Alloc>::_M_initialize_dispatch(_Integer, _Integer, std::__true_type) [with _Integer = int; _Tp = std::vector<trg::Rgb>; _Alloc = std::allocator<std::vector<trg::Rgb> >]’:
  55. /usr/include/c++/4.8.1/bits/stl_vector.h:404:55: required from ‘std::vector<_Tp, _Alloc>::vector(_InputIterator, _InputIterator, const allocator_type&) [with _InputIterator = int; _Tp = std::vector<trg::Rgb>; _Alloc = std::allocator<std::vector<trg::Rgb> >; std::vector<_Tp, _Alloc>::allocator_type = std::allocator<std::vector<trg::Rgb> >]’
  56. tirg_raw.cpp:16:51: required from here
  57. /usr/include/c++/4.8.1/bits/stl_vector.h:1166:59: error: no matching function for call to ‘std::vector<std::vector<trg::Rgb> >::_M_fill_initialize(std::vector<std::vector<trg::Rgb> >::size_type, int&)’
  58. _M_fill_initialize(static_cast<size_type>(__n), __value);
  59. ^
  60. /usr/include/c++/4.8.1/bits/stl_vector.h:1166:59: note: candidate is:
  61. /usr/include/c++/4.8.1/bits/stl_vector.h:1212:7: note: void std::vector<_Tp, _Alloc>::_M_fill_initialize(std::vector<_Tp, _Alloc>::size_type, const value_type&) [with _Tp = std::vector<trg::Rgb>; _Alloc = std::allocator<std::vector<trg::Rgb> >; std::vector<_Tp, _Alloc>::size_type = long unsigned int; std::vector<_Tp, _Alloc>::value_type = std::vector<trg::Rgb>]
  62. _M_fill_initialize(size_type __n, const value_type& __value)
  63. ^
  64. /usr/include/c++/4.8.1/bits/stl_vector.h:1212:7: note: no known conversion for argument 2 from ‘int’ to ‘const value_type& {aka const std::vector<trg::Rgb>&}’
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement