Computing.Net > Forums > Programming > Help with c programming!

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Help with c programming!

Reply to Message Icon

Name: modnar
Date: March 15, 2004 at 18:39:27 Pacific
OS: win xp
CPU/Ram: amd 2500
Comment:

Hi, I'm a rookie in c programming and need some help with writing a simple stopwatch program.

The stopwatch must have a circular background, with both a digital (minutes: seconds) and analogue display (second, minute hands). The second hand must sweep behind the digital display as well. All graphics are to be done using only pixel manipulation.

Can someone provide a bit of code to get me started on this? Thanks in advance!



Sponsored Link
Ads by Google

Response Number 1
Name: Fozzie
Date: March 17, 2004 at 21:43:51 Pacific
Reply:

For Borland compilers:

#include <stdio.h>
#include <time.h>
#include <graphics.h>

int main()
{

//Initialize timer and variables for
//interacting with timer

//Initialize graphics mode here
//and reserve memory to store graphics for
//basic clock background graphics

//Main program loop here
while (somecodition != quit)
{
//On every timer click, update graphics and
//draw them to the screen and check for user //input
}

//Free resources used during program and
//maybe restore text mode

}//End of program

//Function to initialize timer
//Function to handle drawing the graphics


0
Reply to Message Icon

Related Posts

See More


What is a Null file? masked input



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Help with c programming!

Need help with C++ program www.computing.net/answers/programming/need-help-with-c-program/5152.html

Need help with C++ program www.computing.net/answers/programming/need-help-with-c-program/19441.html

Need help with C programming www.computing.net/answers/programming/need-help-with-c-programming/6970.html