I'm trying to initialize a dynamic array and pass it through a function, but I keep getting errors every-time I do so.
float addLayer(float layers[]){
float addColor = 0;
if (std::find(std::begin(layers), std::end(layers), addColor)){
// run code
addColor = ...;
}
return addColor
}
float layers[] = {0};
newColor = addLayer(layers[]); //line 2
Error I receive:
Expected identifier or '(' on line 2
Any help would be appreciated, thank you