3 ms·
It's actually float* - which is a pointer to a float (hn's formatting can eat these sometimes) example: float* f = GetF(); // In a C world, you rely o
by maccard 5y ago
It's actually float* - which is a pointer to a float (hn's formatting can eat these sometimes)
example:
float* f = GetF();
// In a C world, you rely on the documentation to tell you how long f is valid for.
SomeFunc(*f);
// We _know_ this is safe.
std::unique_ptr<float> f = GetF();
SomeFunc(*f.get());