I wondered if it's possible to default initialize a int& parameter other than this:
int temp;
void func(int& value = temp){
}
I mean i can initialize int* like this:
void func(int* value = NULL){
}
so i wondered if there is something similar for int& that doesn't requires me to create a temporary variable. I need to initialize it with something like NULL to check in the function if a variable was passed in and then change it. I want to do something like this:
int getSeed(int* seed = NULL){
if(seed != NULL)
*seed = *seed / 2; // some math here
return *seed;
}
with &seed as parameter. Thanks in advance!