I need help trying to pass the memory address of a character array, a reference. I can't get it to work but here's an example with an int.
void change(&int new_value)
{
new_value = 10;
return;
}
void main(void)
{
int value = 9;
change(value);
return
}
simple with int, float, char, and string but I don't know how to do this with arrays, especially char arrays. I tried char* newvalue, char& newvalue[] and all sorts of combinations but I can't get it to compile =(
void change(&int new_value)
{
new_value = 10;
return;
}
void main(void)
{
int value = 9;
change(value);
return
}
simple with int, float, char, and string but I don't know how to do this with arrays, especially char arrays. I tried char* newvalue, char& newvalue[] and all sorts of combinations but I can't get it to compile =(