Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
LuxARTS16136yWhy you want to "return" a string? You can declare an array (char[]), pass the memory address to the function and work with it.
-
capcj1556yStrings ARE a kind of civilization, man. If you don't feel like that in the other languages, it's because someone hide the complexity from you: call it "Atlantis", lol
-
@neriald then the program already has a bug. Or, you could define structs with Pascal like strings, but that runs into different problems - e.g. you can never hand around the rest of the string for further parsing.
Related Rants
C is a cool programming language where if you want to return a string from a function you have to set up an entire physical-universe human social system for adjudicating who is responsible for freeing it "In order to create a C string, you must first create civilization"
"In order to create a C string, you must first create civilization"
rant
c