4 ms·
Could you add some extra information why this is so helpful or handy to have? Think it will benefit readers that are starting out with C etc.
by mobilemidget 6y ago
Could you add some extra information why this is so helpful or handy to have? Think it will benefit readers that are starting out with C etc.
- saagarjha 6y agoIn C, dynamically-sized vectors don’t carry around size information with them, often leading to bugs. This struct attempts to keep the two together.
- GoblinSlayer 6y agoMemory corruption in sudo password feedback code happened because length and pointer sit as unrelated variables and have to be manipulated by two separate statements every time like some kind of manually inlined function. For comparison putty slice API handles slice as a whole object in a single statement keeping length and pointer consistent.