Deutsch English Français Italiano |
<vc9kck$2u6ef$1@raubtier-asyl.eternal-september.org> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!raubtier-asyl.eternal-september.org!.POSTED!not-for-mail From: Bonita Montero <Bonita.Montero@gmail.com> Newsgroups: comp.lang.c++,alt.comp.lang.c++.misc Subject: Re: Counting Characters!! Date: Mon, 16 Sep 2024 17:55:02 +0200 Organization: A noiseless patient Spider Lines: 22 Message-ID: <vc9kck$2u6ef$1@raubtier-asyl.eternal-september.org> References: <vc34i0$3rnbg$1@paganini.bofh.team> <vc4oti$1kk40$5@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Mon, 16 Sep 2024 17:55:00 +0200 (CEST) Injection-Info: raubtier-asyl.eternal-september.org; posting-host="7f2e19ea611e8f4c2d249d670ad653d4"; logging-data="3086799"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19ImRSRySHh6d7zIKcydH8nbgo8SVtunqI=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:0Y0u0WubgxBfLOKAVOK182jMYV4= In-Reply-To: <vc4oti$1kk40$5@dont-email.me> Content-Language: de-DE Bytes: 1622 Am 14.09.2024 um 21:41 schrieb Chris Ahlstrom: > DMZ wrote this copyrighted missive and expects royalties: > >> This simple program will count characters for you!! >> >> #include <stdio.h> >> >> int main() >> { >> printf(" = %d characters", printf("Hello World!")); >> >> return 0; >> } > > Cute. > Nice, but this counts the characters at compile-time: std::string_view sv( "Hello World!" ); std::cout << sv << " = " << sv.length() << " characters" << endl;