Click here to Skip to main content
15,897,187 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
GeneralRe: Simple Task Memory Watcher Pin
Dudi Avramov2-Mar-04 20:45
Dudi Avramov2-Mar-04 20:45 
GeneralRe: WaitForSingleObject Pin
mjmcinto2-Mar-04 10:59
mjmcinto2-Mar-04 10:59 
GeneralRe: WaitForSingleObject Pin
Diddy2-Mar-04 11:07
Diddy2-Mar-04 11:07 
Generaltext-to-phoneme conversion Pin
pxie2-Mar-04 9:50
pxie2-Mar-04 9:50 
GeneralRe: text-to-phoneme conversion Pin
Chiew Heng Wah2-Mar-04 17:38
Chiew Heng Wah2-Mar-04 17:38 
GeneralRe: text-to-phoneme conversion Pin
pxie3-Mar-04 3:34
pxie3-Mar-04 3:34 
GeneralHello all I want to capture an image from a Camera Pin
GegoTheWizard2-Mar-04 9:04
GegoTheWizard2-Mar-04 9:04 
GeneralRe: Hello all I want to capture an image from a Camera Pin
Chiew Heng Wah2-Mar-04 16:54
Chiew Heng Wah2-Mar-04 16:54 
GeneralRe: Hello all I want to capture an image from a Camera Pin
GegoTheWizard3-Mar-04 9:05
GegoTheWizard3-Mar-04 9:05 
GeneralRe: Hello all I want to capture an image from a Camera Pin
Chiew Heng Wah3-Mar-04 14:47
Chiew Heng Wah3-Mar-04 14:47 
GeneralRe: Hello all I want to capture an image from a Camera Pin
GegoTheWizard23-Mar-04 12:51
GegoTheWizard23-Mar-04 12:51 
GeneralMFC help!!! Pin
modeonetwo2-Mar-04 8:58
modeonetwo2-Mar-04 8:58 
GeneralRe: MFC help!!! Pin
GegoTheWizard2-Mar-04 9:23
GegoTheWizard2-Mar-04 9:23 
GeneralRe: MFC help!!! Pin
David Crow2-Mar-04 9:23
David Crow2-Mar-04 9:23 
GeneralRe: MFC help!!! Pin
modeonetwo2-Mar-04 12:43
modeonetwo2-Mar-04 12:43 

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.