Sujet : Re: Suggested method for returning a string from a C program?
De : rjh (at) *nospam* cpax.org.uk (Richard Heathfield)
Groupes : comp.lang.cDate : 19. Mar 2025, 05:51:02
Autres entêtes
Organisation : Fix this later
Message-ID : <vrdifm$4n2o$1@dont-email.me>
References : 1 2 3
User-Agent : Mozilla Thunderbird
On 19/03/2025 04:42, DFS wrote:
Pretty easy fixes:
1 use scanf()
2 update int to long
3 handle special case of n = 1
4 instead of collecting the results in a char variable, I print
them as they're calculated
You've also fixed another glitch which may or may not have been significant:
$ file post2.txt
post2.txt: news, ASCII text
So wherever that UTF-8 came from, it's gone now.
-- Richard HeathfieldEmail: rjh at cpax dot org dot uk"Usenet is a strange place" - dmr 29 July 1999Sig line 4 vacant - apply within