Witam!
Mam problem z kompilacją kodu. Proszę o znalezienie błędu. Wiem, że błąd pojawia się w 21 lini pliku OpenGL_P1.cpp
Z góry dzięki.
PS.: Jak coś potrzeba proszę pisać postaram się odpowiedzieć jak najszybciej.
Link do kodu: https://github.com/wojtij99/OpenGL_P1
Podczas kompilacji jest wypisywana taka litania błędów:
1>c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\xmemory0(879): error C2440: "inicjowanie": nie można konwertować z "_Ty" na "_Objty"
1> with
1> [
1> _Ty=Vertex
1> ]
1> and
1> [
1> _Objty=unsigned int
1> ]
1>c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\xmemory0(879): note: Nie jest dostępny żaden operator konwersji zdefiniowany przez użytkownika, który mógłby wykonać tę konwersję lub operator nie może zostać wywołany
1>c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\xmemory(163): note: zobacz odwołanie do funkcji szablon; wystąpienie „void std::_Default_allocator_traits<_Alloc>::construct<_Ty,Vertex&>(_Alloc &,_Objty *const ,Vertex &)” jest kompilowane
1> with
1> [
1> _Alloc=std::allocator<GLuint>,
1> _Ty=unsigned int,
1> _Objty=unsigned int
1> ]
1>c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\xmemory(164): note: zobacz odwołanie do funkcji szablon; wystąpienie „void std::_Default_allocator_traits<_Alloc>::construct<_Ty,Vertex&>(_Alloc &,_Objty *const ,Vertex &)” jest kompilowane
1> with
1> [
1> _Alloc=std::allocator<GLuint>,
1> _Ty=unsigned int,
1> _Objty=unsigned int
1> ]
1>c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\xmemory(190): note: zobacz odwołanie do funkcji szablon; wystąpienie „void std::_Uninitialized_backout_al<_FwdIt,_Alloc>::_Emplace_back<_Ty&>(_Ty &)” jest kompilowane
1> with
1> [
1> _FwdIt=unsigned int *,
1> _Alloc=std::allocator<GLuint>,
1> _Ty=Vertex
1> ]
1>c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\xmemory(190): note: zobacz odwołanie do funkcji szablon; wystąpienie „void std::_Uninitialized_backout_al<_FwdIt,_Alloc>::_Emplace_back<_Ty&>(_Ty &)” jest kompilowane
1> with
1> [
1> _FwdIt=unsigned int *,
1> _Alloc=std::allocator<GLuint>,
1> _Ty=Vertex
1> ]
1>c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\xmemory(217): note: zobacz odwołanie do funkcji szablon; wystąpienie „_FwdIt std::_Uninitialized_copy_al_unchecked<_Ty*,unsigned int*,_Alloc>(_InIt,const _InIt,const _FwdIt,_Alloc &,std::_General_ptr_iterator_tag,std::_Any_tag)” jest kompilowane
1> with
1> [
1> _FwdIt=unsigned int *,
1> _Ty=Vertex,
1> _Alloc=std::allocator<GLuint>,
1> _InIt=Vertex *
1> ]
1>c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\vector(1823): note: zobacz odwołanie do funkcji szablon; wystąpienie „_FwdIt *std::_Uninitialized_copy<_Iter,unsigned int*,std::allocator<_Ty>>(const _InIt,const _InIt,_FwdIt,_Alloc &)” jest kompilowane
1> with
1> [
1> _FwdIt=unsigned int *,
1> _Iter=Vertex *,
1> _Ty=GLuint,
1> _InIt=Vertex *,
1> _Alloc=std::allocator<GLuint>
1> ]
1>c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\vector(708): note: zobacz odwołanie do funkcji szablon; wystąpienie „unsigned int *std::vector<GLuint,std::allocator<_Ty>>::_Ucopy<_Iter>(_Iter,_Iter,unsigned int *)” jest kompilowane
1> with
1> [
1> _Ty=GLuint,
1> _Iter=Vertex *
1> ]
1>c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\vector(708): note: zobacz odwołanie do funkcji szablon; wystąpienie „unsigned int *std::vector<GLuint,std::allocator<_Ty>>::_Ucopy<_Iter>(_Iter,_Iter,unsigned int *)” jest kompilowane
1> with
1> [
1> _Ty=GLuint,
1> _Iter=Vertex *
1> ]
1>c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\vector(723): note: zobacz odwołanie do funkcji szablon; wystąpienie „void std::vector<GLuint,std::allocator<_Ty>>::_Range_construct_or_tidy<Vertex*>(_Iter,_Iter,std::forward_iterator_tag)” jest kompilowane
1> with
1> [
1> _Ty=GLuint,
1> _Iter=Vertex *
1> ]
1>c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\vector(723): note: zobacz odwołanie do funkcji szablon; wystąpienie „void std::vector<GLuint,std::allocator<_Ty>>::_Range_construct_or_tidy<Vertex*>(_Iter,_Iter,std::forward_iterator_tag)” jest kompilowane
1> with
1> [
1> _Ty=GLuint,
1> _Iter=Vertex *
1> ]
1>c:\users\wojtij99\documents\workspace\c++\opengl_p1\opengl_p1\opengl_p1.cpp(21): note: zobacz odwołanie do funkcji szablon; wystąpienie „std::vector<GLuint,std::allocator<_Ty>>::vector<Vertex*,void>(_Iter,_Iter,const _Alloc &)” jest kompilowane
1> with
1> [
1> _Ty=GLuint,
1> _Iter=Vertex *,
1> _Alloc=std::allocator<GLuint>
1> ]
1>c:\users\wojtij99\documents\workspace\c++\opengl_p1\opengl_p1\opengl_p1.cpp(21): note: zobacz odwołanie do funkcji szablon; wystąpienie „std::vector<GLuint,std::allocator<_Ty>>::vector<Vertex*,void>(_Iter,_Iter,const _Alloc &)” jest kompilowane
1> with
1> [
1> _Ty=GLuint,
1> _Iter=Vertex *,
1> _Alloc=std::allocator<GLuint>
1> ]