I know that technically all three methods below are valid, but is there a logical reason to do this anyway? I mean, many things in C ++ are "technically sound," but that doesn't make them less stupid.
int* someFunction(int* input)
{
}
or
int *someFunction(int *input)
{
}
or
int * someFunction(int * input)
{
}
I personally find the third one annoying, but is there a “right” way? I am generally more likely to use the former (since the latter is more like being used as a dereference operator, which it is not)
source
share