TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
romasha ali
NA
94
38.3k
code block c++ exception
Apr 9 2016 7:28 PM
hi,
i m making clock in code blocks C++ but it giving an exception kindly check the given code and help me out as soon as possible
------CODE------
#include <graphics.h>
#include <time.h>
int main()
{
int gd=DETECT;
int gm;
initgraph(&gd,&gm,"C:\\TC\\BGI");
time_t rawTime;
struct tm * currentTime;
char a[100];
while(1)
{
rawTime =time(NULL);
currentTime=localtime(&rawTime);
strftime(a,100,"%I:%M:%S",currentTime);
setcolor(11);
settextstyle(3,HORIZ_DIR,10);
outtextxy(200,100,a);
strftime(a,100,"%p",currentTime);
settextstyle(3,HORIZ_DIR,2);
outtextxy(600,8,a);
strftime(a,100,"%a,%d %b,%y",currentTime);
settextstyle(3,HORIZ_DIR,5);
outtextxy(310,130,a);
delay(1000);
}
getch();
closegraph();
}
Reply
Answers (
2
)
How can I implement the Algorithm I have explained below?
brief(1-2lines) description of the following program