What's the difference between float* varname and float *varname in classic C?
Formatting. That's it. They mean the same thing.
Where you put the space (or if you even have one, really) is a matter of preference. Some prefer the * next to the varname so that you don't get confused by something like:
float* a, b;
(here, only a is a pointer, b is not)
Others argue that they never declare multiple variables at once, so they prefer the * next to float, since it's part of the type.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With