[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


why didnt c it can have the best of both words, a header byte for you can put the length and a zero terminated so when you know if the string ends, it would be backwards compatible right
>>
>>109103110
wrong board >>>/a/
>>
That would make it c++ a.k.a retard language
>>
>>109103110
It gives you the tools to define whatever kind of string structure you want
>>
CHEEEEEEEEEEEEEEEEEEEEEEEEEEEEN
>>
>>109103110
Also known as a struct with a string and its length as members
>>
>>109103110
>header byte
what happens when your string is longer than the upper limit for a byte?
see >>109105615 because c doesn't have strings in the first place, the whole language passes around arrays for strings. just
 typedef struct { size_t length; char *s; } string; 
bro why do you want first-class support for something the language doesn't use anyways
>>
File: 1687654445182189.png (21 KB, 800x600)
21 KB PNG
>>109103110
>why didnt c it can have the best of both words, a header byte for you can put the length and a zero terminated so when you know if the string ends, it would be backwards compatible right
I know what you're trying to say but I had a stroke trying to read this more carefully



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.