On 24/02/2019 20:47, Jasen Betts wrote:
> On 2019-02-24, The Natural Philosopher wrote:
>> On 24/02/2019 13:09, Richard Heathfield wrote:
>>> If you take the trouble to ensure that you have enough space for your
>>> data, there's nothing wrong with using str.
>>
>> c=malloc(strlen(str)+1);
>> if(c)
>> strcpy (c,str);
>>
>> or
>>
>> c=stdup(str);
>>
>> ....
>>
>> free (c);
>
>
> or alloc_sprintf(.... but someone cross-posted this to windows newsgroups.
>
never heard of that one.....thats not in stdlib...
>
>
--
"The most difficult subjects can be explained to the most slow witted
man if he has not formed any idea of them already; but the simplest
thing cannot be made clear to the most intelligent man if he is firmly
persuaded that he knows already, without a shadow of doubt, what is laid
before him."
- Leo Tolstoy
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|