I'm trying to define a function in C++ and according to jumping into C++ i need to follow the format of
So thats the code I put in, and with that I don't get an error when I try to call the function, but at the same time the function doesn't do what it is supposed to do.Code:int convert(int var){
int var = 0;
var = var * 100 / 255;
return var;
};
Not really sure what i'm doing wrong here.