answersLogoWhite

0

Source code of clock in c plus plus?

User Avatar

Anonymous

10y ago
Updated: 8/17/2019

#include<iostream>

#include<time.h>

int main ()

{

using namespace std;

time_t rawtime, oldtime, endtime;

struct tm * timeinfo;

time (&oldtime);

time (&rawtime);

time (&endtime);

endtime += 10;

while (rawtime != endtime)

{

while (oldtime == rawtime)

time (&rawtime);

oldtime = rawtime;

timeinfo = localtime (&rawtime);

cout << "\rCurrent local time and date: " << asctime (timeinfo);

}

}

User Avatar

Wiki User

10y ago

What else can I help you with?

Related Questions

How do you Open a text file as C plus plus source code?

All C++ source code is is a text file with the .cpp extension. So if you save your code as *****.cpp then it is automatically C++ source code.


What is the differentiate of turbo c from turbo c plus plus?

Turbo C compiles c source. turbo c++ compiles c++ source code.


Source code of DSR and AODV in C plus plus?

code source de dsr sous omnet++4.1 en .cc


What is a source code file in c plus plus?

A source code file is a plain-text file containing C++ instructions. The instructions must be compiled and linked to create a native machine code executable.


Where do you get c plus plus software?

A good open source IDE for C++ would be Code::Blocks or Notepad++.


What is the use of print option in c plus plus?

C++ has no print option. The print option in your IDE allows you to print your C++ source code, thus giving you a "hard" copy of your code.


A c plus plus code name sumcpp saved on a diskis it process or job?

It is neither. It is a source file.


Can you do c plus plus programming on a mac?

You may use one of several open source compilers and code editors (or even IDEs) to develop and compile C++ code that will operate on a Mac.


Can anyone provide me a executable C or C plus plus language source code for netstat in Windows XP environment?

Netstat for Windows is provided by Microsoft itself, so you're unlikely to find any source code for it. However you may find Linux versions of Netstat source code available. The functionality may differ to some extent, but how useful they are will depend on why you need the source code in the first place.


What do you mean by running of a program in c plus plus?

In order to run a C++ program the program must be compiled and linked to create an executable. It is the executable that actually runs, not the source code. The source code is simply the human-readable code the compiler requires to generate object code for the linker which produces the machine-readable code. However, when the executable is executed within a debugging environment, we can set breakpoints in the source code and step through the source code just as if the source itself were executing, as would be the case if C++ were an interpreted language. Unlike an interpreted language where we can change the source code and see the results immediately, the source code (or at least the portion that has changed) must be recompiled to accommodate the changes.


Is C plus plus preprocessor software?

Sometimes, it is. Some implementations compile C++ code into C code, and then compile the C code.


How do you Convert C plus plus code to MIPS?

C++ is high-level source code, while MIPS is low-level machine code for a reduced instruction set computer (RISC). To convert C++ source code to MIPS you need a C++ compiler specific to the MIPS architecture you're building against.