void add_assign3(int *j)
{
*j = *j + 3;
}
It's a method that has a return type defined as void.
You don't need to provide a return statement in such case. Alternate, you can do:
void add_assign3(int *j)
{
*j = *j + 3;
return;
}
If you want to pass back any value then you would return anything specific and accordingly setup the return type of your method.
Read for more details:
Return from void functions in C++[
^]