3 ms·
I didnt suggest passong pointers. C's type system is strong enough to let me do typedef struct { char* buf; int sz; } safe_string;
by maccard 4y ago
I didnt suggest passong pointers. C's type system is strong enough to let me do
typedef struct {
char* buf;
int sz;
} safe_string;
typedef struct {
char* buf;
int sz;
} unsafe_string;
And differentiate between the two.