In the implementation of the function SignalChangedEvent, i get this long error:
|error: request for member 'setValue' in '((std::vector<Wire*, std::allocator<Wire*> >*)vec)->std::vector<_Tp, _Alloc>::operator[] [with _Tp = Wire*, _Alloc = std::allocator<Wire*>](sample)', which is of non-class type 'Wire*'|
Is there a different way to write vec[sample].setValue(value) to avoid this mess?
Thanks in advance.
vec[sample] returns a pointer to a Wire, so to access members and methods you need to either dereference that pointer and then use the . operator, or simply use the -> operator.