B
Bobrick
Hi.
Thanks to everyone who replied to my last post, it turns out it wasn't
the line where I was trying to treat the variable in question as an
array which was the problem, but the line above.
char temp;
std::vector<unsigned char> mmessage;
while (!done){
mmessage = midiin->Getmidi();
temp = mmessage[1];
textBox1->Text = temp.ToString();
done = true;
}
GetMidi is a function which returns an std::vector<unsigned char>, the
code for which is:
std::vector<unsigned char> RtMidiIn :: Getmidi(void)
{
double stamp;
std::vector<unsigned char> message;
RtMidiIn *midiin = 0;
stamp = midiin->getMessage( &message );
return message;
}
And the error message I recieve is:
error C2679: binary '=' : no operator found which takes a right-hand
operand of type 'int' (or there is no acceptable conversion)
C:\Program Files\Microsoft Visual Studio
8\VC\include\vector(549): could be 'std::vector<_Ty>
&std::vector<_Ty>:
perator =(const std::vector<_Ty> &)'
with
[
_Ty=unsigned char
]
while trying to match the argument list '(std::vector<_Ty>,
int)'
with
[
_Ty=unsigned char
]
Can anyone explain in less confusing terms what this error means?
Thanks to everyone who replied to my last post, it turns out it wasn't
the line where I was trying to treat the variable in question as an
array which was the problem, but the line above.
char temp;
std::vector<unsigned char> mmessage;
while (!done){
mmessage = midiin->Getmidi();
temp = mmessage[1];
textBox1->Text = temp.ToString();
done = true;
}
GetMidi is a function which returns an std::vector<unsigned char>, the
code for which is:
std::vector<unsigned char> RtMidiIn :: Getmidi(void)
{
double stamp;
std::vector<unsigned char> message;
RtMidiIn *midiin = 0;
stamp = midiin->getMessage( &message );
return message;
}
And the error message I recieve is:
error C2679: binary '=' : no operator found which takes a right-hand
operand of type 'int' (or there is no acceptable conversion)
C:\Program Files\Microsoft Visual Studio
8\VC\include\vector(549): could be 'std::vector<_Ty>
&std::vector<_Ty>:
with
[
_Ty=unsigned char
]
while trying to match the argument list '(std::vector<_Ty>,
int)'
with
[
_Ty=unsigned char
]
Can anyone explain in less confusing terms what this error means?