Hy
Following definition in the sketch: int myCurve[11] ={0,25,35,40,45,50,55,60,65,75,100};
later in the Setup, I Do Serial.print(sizeof(myCurve))
Well, the output is not the expectet 11, it is 44. Why? Where is my basic missunderstanding of Arrays?
Later I do txInput.setExpo(myCurve)
And in this Function, I have
char simodInput::setExpo(int *expo) {
memcpy(expo,_expo,sizeof(expo));
Serial.println("EXPO : ");
for (int i=0;i<sizeof(expo);i++) {Serial.println(expo[i]);}
Serial.println("EXPO OUT: ");
for (int i=0;i<sizeof(_expo);i++) {Serial.println(_expo[i]);}
return 1;
}
This brings the Output "EXPO" of -1 / 25 / 35 / 40 and "EXPO OUT" of 46 Values of non-logic (to me).
Why -1 and why only 4 Values? And why cant I copy the Array?
Hopefully it is a real basic missunderstanding.
Thanks for help