Dudearoo
useing Code::Blocks
Hey you guys!
I've got an problem, i want to print the current time, simple as that.
heres my Code.
#include <iostream>
#include <stdio.h>
#include <time.h>
using namespace std;
int main()
{
time_t rawtime;
struct tm * timeinfo;
char space[50];
time (&rawtime);
timeinfo = localtime(&rawtime);
strftime(space,80,"Current Time:%h%m%p",timeinfo);
cout << "Hello world!" << endl;
return 0;
}
the Output is just the hello world! line, there are no error or warning messages show ether.
I just learnt this from Cplusplus
Or can you Guys please give me a quick teaching on how to do this and tell me how it works? If all else fails.
thanks Guys
:)