If I have the following code example:
#include <iostream>
using namespace std;
unsigned char Receive(void){
unsigned char q[4] = {0x0B, 0x0B, 0x0B, 0x0B};
return q;
}
void Transmit(){
unsigned char a[4];
a = Receive();
}
int main()
{
Transmit();
return 0;
}
Then why can't I assign the return value of Receive(void)
to the variable q when they both are unsigned char?
EDIT(see my comment below):
unsigned char Receive(void){
array<unsigned char, 4> q{{0x0B, 0x0B, 0x0B, 0x0B}}
return q;
}
void Transmit(){
array<unsigned char, 4> a;
a = Receive;
}