views:

80

answers:

2

I'm using C++ under Linux compiling with standard GCC. In my program I want to add a simple clock showing HH:MM:SS. What's the easiest way to do that?

+4  A: 

A good way is to use localtime

ennuikiller
+5  A: 

You can make use of localtime along with strftime.

Working link

codaddict