3 ms·
What pistoleer said basically. Lets say a function expects a 2D point and you want to pass in a rectangle struct (which has x and y plus more info). You'd do so
by sirwhinesalot 2y ago
What pistoleer said basically. Lets say a function expects a 2D point and you want to pass in a rectangle struct (which has x and y plus more info). You'd do something like:
void f({float x, float y} p);
Becomes
void f(void* p, size_t offsets[2]);