Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
tptacek
on Oct 18, 2020
|
parent
|
context
|
favorite
| on:
C++ still isn't cutting it
Why do you need a dynamic string of any sort for this problem?
(I think you estimated badly, for what it's worth.)
saagarjha
on Oct 18, 2020
[–]
You'd need it to read words, unless you're using a libc function that does the allocation for you. (Not that you actually need a full string, realloc works just fine for the code I'm writing.)
tptacek
on Oct 18, 2020
|
parent
[–]
Yeah, I just used strdup and strsep, like a C programmer. You don't need a dynamic string to count words.
:P
Consider applying for YC's Spring batch! Applications are open till Feb 11.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
(I think you estimated badly, for what it's worth.)