Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #126633

Re: How do you do something like this?

From Ben Bacarisse <ben.usenet@bsb.me.uk>
Newsgroups comp.lang.c, comp.lang.c++
Subject Re: How do you do something like this?
Date 2018-02-13 02:02 +0000
Organization A noiseless patient Spider
Message-ID <876071ir4g.fsf@bsb.me.uk> (permalink)
References <5a823f5c$0$716$14726298@news.sunsite.dk>

Cross-posted to 2 groups.

Show all headers | View raw


G B <gb@gb.com> writes:

> Who can provide a two or three liner code in C or C++ to create a

Cross posting between C and C++ can lead to some... disagreements.  I
read this in comp.lang.c first and my answer pertains to C.

> clock like the one shown in this video?
>
> <https://youtu.be/SVxcpL4AJGs>

For the time part, lookup the functions time, localtime and strftime in
whatever C reference you like to use.

For the output part, lookup fputs (or printf), fflush and the meaning of
the special character denoted by the escape sequence \r.

Enough hints?  (I'm avoiding spoilers because I'm guessing this is some
sort of homework or assignment, and if not, at least some challenge
you've set for yourself.)

-- 
Ben.

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

How do you do something like this? G B <gb@gb.com> - 2018-02-13 01:35 +0000
  Re: How do you do something like this? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-02-13 02:02 +0000
    Re: How do you do something like this? "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2018-02-13 03:53 +0100
  Re: How do you do something like this? bartc <bc@freeuk.com> - 2018-02-13 11:50 +0000
    Re: How do you do something like this? legalize+jeeves@mail.xmission.com (Richard) - 2018-02-13 21:34 +0000
      Re: How do you do something like this? bartc <bc@freeuk.com> - 2018-02-13 22:01 +0000
  Re: How do you do something like this? Egor <egor@ruby.local> - 2018-02-13 13:56 +0200
    Re: How do you do something like this? Juha Nieminen <nospam@thanks.invalid> - 2018-02-19 06:28 +0000
      Re: How do you do something like this? Egor <egor@ruby.local> - 2018-02-23 02:48 +0200
        Re: How do you do something like this? "James R. Kuyper" <jameskuyper@verizon.net> - 2018-02-27 08:30 -0500
          Re: How do you do something like this? Keith Thompson <kst-u@mib.org> - 2018-02-27 09:07 -0800
          Re: How do you do something like this? Real Troll <Real.Troll@Trolls.com> - 2018-02-27 18:07 -0400
            Re: How do you do something like this? David Brown <david.brown@hesbynett.no> - 2018-02-28 09:59 +0100
              Re: How do you do something like this? Keith Thompson <kst-u@mib.org> - 2018-02-28 10:03 -0800
                Re: How do you do something like this? David Brown <david.brown@hesbynett.no> - 2018-02-28 22:35 +0100
                Re: How do you do something like this? Steven Petruzzellis <frelwizzen@gmail.com> - 2018-03-01 13:07 -0800
                Re: How do you do something like this? Steven Petruzzellis <frelwizzen@gmail.com> - 2018-03-01 17:01 -0800
                Re: How do you do something like this? Steven Petruzzellis <frelwizzen@gmail.com> - 2018-03-01 21:11 -0800
              Re: How do you do something like this? Steven Petruzzellis <frelwizzen@gmail.com> - 2018-03-01 13:53 -0800
          Re: How do you do something like this? Egor <egor@ruby.local> - 2018-03-05 14:48 +0200

csiph-web