Click here to Skip to main content
15,906,708 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralCAccessor and NULL value Pin
Anonymous2-Mar-04 19:47
Anonymous2-Mar-04 19:47 
QuestionHow can I gray menu items on popup menu? Pin
shuangdaile2-Mar-04 18:55
shuangdaile2-Mar-04 18:55 
AnswerRe: How can I gray menu items on popup menu? Pin
Prakash Nadar2-Mar-04 19:19
Prakash Nadar2-Mar-04 19:19 
GeneralRe: How can I gray menu items on popup menu? Pin
shuangdaile2-Mar-04 20:17
shuangdaile2-Mar-04 20:17 
AnswerRe: How can I gray menu items on popup menu? Pin
KarstenK2-Mar-04 21:51
mveKarstenK2-Mar-04 21:51 
GeneralHelp me to Retrieve System Access Rights Pin
.NetRams2-Mar-04 18:42
.NetRams2-Mar-04 18:42 
GeneralRe: Help me to Retrieve System Access Rights Pin
Steve S2-Mar-04 23:33
Steve S2-Mar-04 23:33 
GeneralRe: Help me to Retrieve System Access Rights Pin
.NetRams3-Mar-04 16:57
.NetRams3-Mar-04 16:57 
GeneralRe: Help me to Retrieve System Access Rights Pin
.NetRams3-Mar-04 17:13
.NetRams3-Mar-04 17:13 
GeneralIntercepting the Reply button in OutLook Pin
gordingin2-Mar-04 18:32
gordingin2-Mar-04 18:32 
GeneralUsing customized control in doc/view Pin
NotProfessional2-Mar-04 16:38
NotProfessional2-Mar-04 16:38 
GeneralRe: Using customized control in doc/view Pin
Prakash Nadar2-Mar-04 19:59
Prakash Nadar2-Mar-04 19:59 
GeneralGetting process address info in windows Pin
Zee man2-Mar-04 16:20
Zee man2-Mar-04 16:20 
QuestionHow do I find out when a byte is being sent or received by Dial-up networking? Pin
perrymail20002-Mar-04 14:56
perrymail20002-Mar-04 14:56 
QuestionIDL file? Pin
satcat2-Mar-04 13:34
satcat2-Mar-04 13:34 
AnswerRe: IDL file? Pin
Prakash Nadar2-Mar-04 14:04
Prakash Nadar2-Mar-04 14:04 
AnswerRe: IDL file? Pin
suneetchandok2-Mar-04 20:35
susssuneetchandok2-Mar-04 20:35 
GeneralHELP ME WITH *INI files Pin
Member 4689072-Mar-04 12:12
Member 4689072-Mar-04 12:12 
GeneralRe: HELP ME WITH *INI files Pin
Balkrishna Talele2-Mar-04 18:07
Balkrishna Talele2-Mar-04 18:07 
GeneralNEED HELP PLEASE!! Pin
Anonymous2-Mar-04 11:59
Anonymous2-Mar-04 11:59 
GeneralRe: NEED HELP PLEASE!! Pin
Anonymous2-Mar-04 13:23
Anonymous2-Mar-04 13:23 
GeneralRe: NEED HELP PLEASE!! Pin
Steve S2-Mar-04 23:37
Steve S2-Mar-04 23:37 
GeneralRe: NEED HELP PLEASE!! Pin
DougW483-Mar-04 8:47
DougW483-Mar-04 8:47 
I think the easiest thing for you to do would be to just figure out how many seconds difference there is between the two times, and then convert that back to the proper time format for displaying purposes only. I'm confused about the hour variable. Is this military time that goes from 0-23, or does it go from 1-12? If this is military time, then your life is really easy. You don't even need an hour and minute variable in your Watch class anymore, just a second variable. Use the following as a model for getting your time (you really should have a function in your class which asks thisSmile | :)

int hrs, mins, secs;
cout << "enter the hour\n";
cin >> hrs;
Sec = hrs * 3600;
cout << "enter the minute\n";
cin >> mins;
Sec += mins * 60;
cout << "enter the seconds\n"
cin >> secs;
Sec += secs;

There, now you have the time in the exact second of the day that you started. And you can do the same to get the second time...and I hope you can figure out how to find the difference between times...just subtract the seconds. Now, to display your time back in proper format:

hrs = Sec / 3600;
min = (Sec % hrs)/60;
secs = (Sec % min);

There ya go! Hope you get an A.
GeneralSimple Task Memory Watcher Pin
jcwallace032-Mar-04 11:55
jcwallace032-Mar-04 11:55 
GeneralRe: Simple Task Memory Watcher Pin
Balkrishna Talele2-Mar-04 18:04
Balkrishna Talele2-Mar-04 18:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.