0

hi all

i need some help with time.h for in the following:

i want to make a programme in which while time is 12:00 PM, It prints a Web-page

USING time.h

thx,,,,
kim00000

3
Contributors
5
Replies
6
Views
8 Years
Discussion Span
Last Post by 3bdelhakeem
0

Your question is pretty vague, can you be a bit more clear on that?

Do you want it to open a web browser when it is 12:00 PM or a specific web page? Or what do exactly mean?

0

sorry for the wrong Thread title,,
i mean ,printing a web page

#include <time.h>
#include <iostream.h>

int main()
{
struct tm g;
P:
getsystime ( &g );
while (g.tm_hour == 12)
{
cout << "printing...";
//Print a Webpage (Automatically without confirmation)
}
goto P;
}

Help me with the printing code...
thx,,
Kim00000

Edited by 3bdelhakeem: Missing a sentence...

0

:-O >> goto P;

Huh-oh, you don't know what you just did.

i put goto P;
To keep on getting System time into g because i said

while (g.tm_hour == 12)
{
//do something
}

so if it got the system time into g as, ex: 8:00 AM at the beginning of excuting the programme without repeating the g.tm_hour will still 8:00 AM and will not be 12:00 PM into g..
got it? :D

ATTENTION:
note the point "P:" before the

getsystime ( &g );

thx,,,
kim00000

0

Just help me with the printing code ,cause i tested that code ,but still don't know the printing code ,,,

BUT the time is working fine (with "goto P;") :P


thx
kim00000

Edited by 3bdelhakeem: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.