prog.cpp:16:32: error: 'number_of_variables' is not a type
std::vector<int> myVariables(number_of_variables );
^
prog.cpp: In member function 'void cChromo::Rand()':
prog.cpp:25:5: error: '((cChromo*)this)->cChromo::myVariables' does not have class type
myVariables.push_back( uni(rng) );
^
prog.cpp: In member function 'void cChromo::Show()':
prog.cpp:31:18: error: invalid initialization of reference of type 'std::vector<int> (cChromo::*&&)(int)' from expression of type '<unresolved overloaded function type>'
for( auto v : myVariables )
^
prog.cpp:31:18: error: no matching function for call to 'begin(std::vector<int> (cChromo::*&)(int))'
In file included from /usr/include/c++/5/string:51:0,
from /usr/include/c++/5/bits/locale_classes.h:40,
from /usr/include/c++/5/bits/ios_base.h:41,
from /usr/include/c++/5/ios:42,
from /usr/include/c++/5/ostream:38,
from /usr/include/c++/5/iostream:39,
from prog.cpp:2:
/usr/include/c++/5/bits/range_access.h:87:5: note: candidate: template<class _Tp, unsigned int _Nm> constexpr _Tp* std::begin(_Tp (&)[_Nm])
begin(_Tp (&__arr)[_Nm])
^
/usr/include/c++/5/bits/range_access.h:87:5: note: template argument deduction/substitution failed:
prog.cpp:31:18: note: mismatched types '_Tp [_Nm]' and 'std::vector<int> (cChromo::*)(int)'
for( auto v : myVariables )
^
In file included from /usr/include/c++/5/string:51:0,
from /usr/include/c++/5/bits/locale_classes.h:40,
from /usr/include/c++/5/bits/ios_base.h:41,
from /usr/include/c++/5/ios:42,
from /usr/include/c++/5/ostream:38,
from /usr/include/c++/5/iostream:39,
from prog.cpp:2:
/usr/include/c++/5/bits/range_access.h:58:5: note: candidate: template<class _Container> decltype (__cont.begin()) std::begin(const _Container&)
begin(const _Container& __cont) -> decltype(__cont.begin())
^
/usr/include/c++/5/bits/range_access.h:58:5: note: template argument deduction/substitution failed:
/usr/include/c++/5/bits/range_access.h: In substitution of 'template<class _Container> decltype (__cont.begin()) std::begin(const _Container&) [with _Container = std::vector<int> (cChromo::*)(int)]':
prog.cpp:31:18: required from here
/usr/include/c++/5/bits/range_access.h:58:5: error: request for member 'begin' in '__cont', which is of non-class type 'std::vector<int> (cChromo::* const)(int)'
/usr/include/c++/5/bits/range_access.h:48:5: note: candidate: template<class _Container> decltype (__cont.begin()) std::begin(_Container&)
begin(_Container& __cont) -> decltype(__cont.begin())
^
/usr/include/c++/5/bits/range_access.h:48:5: note: template argument deduction/substitution failed:
/usr/include/c++/5/bits/range_access.h: In substitution of 'template<class _Container> decltype (__cont.begin()) std::begin(_Container&) [with _Container = std::vector<int> (cChromo::*)(int)]':
prog.cpp:31:18: required from here
/usr/include/c++/5/bits/range_access.h:48:5: error: request for member 'begin' in '__cont', which is of non-class type 'std::vector<int> (cChromo::*)(int)'
In file included from /usr/include/c++/5/bits/range_access.h:36:0,
from /usr/include/c++/5/string:51,
from /usr/include/c++/5/bits/locale_classes.h:40,
from /usr/include/c++/5/bits/ios_base.h:41,
from /usr/include/c++/5/ios:42,
from /usr/include/c++/5/ostream:38,
from /usr/include/c++/5/iostream:39,
from prog.cpp:2:
/usr/include/c++/5/initializer_list:89:5: note: candidate: template<class _Tp> constexpr const _Tp* std::begin(std::initializer_list<_Tp>)
begin(initializer_list<_Tp> __ils) noexcept
^
/usr/include/c++/5/initializer_list:89:5: note: template argument deduction/substitution failed:
prog.cpp:31:18: note: mismatched types 'std::initializer_list<_Tp>' and 'std::vector<int> (cChromo::*)(int)'
for( auto v : myVariables )
^
prog.cpp:31:18: error: no matching function for call to 'end(std::vector<int> (cChromo::*&)(int))'
In file included from /usr/include/c++/5/string:51:0,
from /usr/include/c++/5/bits/locale_classes.h:40,
from /usr/include/c++/5/bits/ios_base.h:41,
from /usr/include/c++/5/ios:42,
from /usr/include/c++/5/ostream:38,
from /usr/include/c++/5/iostream:39,
from prog.cpp:2:
/usr/include/c++/5/bits/range_access.h:97:5: note: candidate: template<class _Tp, unsigned int _Nm> constexpr _Tp* std::end(_Tp (&)[_Nm])
end(_Tp (&__arr)[_Nm])
^
/usr/include/c++/5/bits/range_access.h:97:5: note: template argument deduction/substitution failed:
prog.cpp:31:18: note: mismatched types '_Tp [_Nm]' and 'std::vector<int> (cChromo::*)(int)'
for( auto v : myVariables )
^
In file included from /usr/include/c++/5/string:51:0,
from /usr/include/c++/5/bits/locale_classes.h:40,
from /usr/include/c++/5/bits/ios_base.h:41,
from /usr/include/c++/5/ios:42,
from /usr/include/c++/5/ostream:38,
from /usr/include/c++/5/iostream:39,
from prog.cpp:2:
/usr/include/c++/5/bits/range_access.h:78:5: note: candidate: template<class _Container> decltype (__cont.end()) std::end(const _Container&)
end(const _Container& __cont) -> decltype(__cont.end())
^
/usr/include/c++/5/bits/range_access.h:78:5: note: template argument deduction/substitution failed:
/usr/include/c++/5/bits/range_access.h: In substitution of 'template<class _Container> decltype (__cont.end()) std::end(const _Container&) [with _Container = std::vector<int> (cChromo::*)(int)]':
prog.cpp:31:18: required from here
/usr/include/c++/5/bits/range_access.h:78:5: error: request for member 'end' in '__cont', which is of non-class type 'std::vector<int> (cChromo::* const)(int)'
/usr/include/c++/5/bits/range_access.h:68:5: note: candidate: template<class _Container> decltype (__cont.end()) std::end(_Container&)
end(_Container& __cont) -> decltype(__cont.end())
^
/usr/include/c++/5/bits/range_access.h:68:5: note: template argument deduction/substitution failed:
/usr/include/c++/5/bits/range_access.h: In substitution of 'template<class _Container> decltype (__cont.end()) std::end(_Container&) [with _Container = std::vector<int> (cChromo::*)(int)]':
prog.cpp:31:18: required from here
/usr/include/c++/5/bits/range_access.h:68:5: error: request for member 'end' in '__cont', which is of non-class type 'std::vector<int> (cChromo::*)(int)'
In file included from /usr/include/c++/5/bits/range_access.h:36:0,
from /usr/include/c++/5/string:51,
from /usr/include/c++/5/bits/locale_classes.h:40,
from /usr/include/c++/5/bits/ios_base.h:41,
from /usr/include/c++/5/ios:42,
from /usr/include/c++/5/ostream:38,
from /usr/include/c++/5/iostream:39,
from prog.cpp:2:
/usr/include/c++/5/initializer_list:99:5: note: candidate: template<class _Tp> constexpr const _Tp* std::end(std::initializer_list<_Tp>)
end(initializer_list<_Tp> __ils) noexcept
^
/usr/include/c++/5/initializer_list:99:5: note: template argument deduction/substitution failed:
prog.cpp:31:18: note: mismatched types 'std::initializer_list<_Tp>' and 'std::vector<int> (cChromo::*)(int)'
for( auto v : myVariables )
^