Click here to Skip to main content
15,886,578 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: To make a function in C which does not except "\n" & EOF as input. Pin
David Crow3-Jan-18 5:48
David Crow3-Jan-18 5:48 
AnswerRe: To make a function in C which does not except "\n" & EOF as input. Pin
Tarun Jha3-Jan-18 5:54
Tarun Jha3-Jan-18 5:54 
GeneralRe: To make a function in C which does not except "\n" & EOF as input. Pin
David Crow3-Jan-18 6:02
David Crow3-Jan-18 6:02 
GeneralRe: To make a function in C which does not except "\n" & EOF as input. Pin
leon de boer3-Jan-18 14:45
leon de boer3-Jan-18 14:45 
GeneralRe: To make a function in C which does not except "\n" & EOF as input. Pin
Richard MacCutchan3-Jan-18 21:54
mveRichard MacCutchan3-Jan-18 21:54 
QuestionC Program to Calculate Difference Between Two Time Periods . Pin
Tarun Jha31-Dec-17 12:27
Tarun Jha31-Dec-17 12:27 
AnswerRe: C Program to Calculate Difference Between Two Time Periods . Pin
Richard MacCutchan31-Dec-17 22:42
mveRichard MacCutchan31-Dec-17 22:42 
AnswerRe: C Program to Calculate Difference Between Two Time Periods . Pin
jschell1-Jan-18 6:22
jschell1-Jan-18 6:22 
It solves the following equation for X.

{stop time} + {X} = {start time}

If you walk through examples by hand you will see that the code appears to solve that equation correctly.


However like the other response I too find it counter intuitive.

As noted in the other response the expected difference would be to subtract start from stop. This solution ends up with negative values.

It also treats a time period on a fixed clock - one that does not cross midnight. Which is nonsensical in human terms.
GeneralRe: C Program to Calculate Difference Between Two Time Periods . Pin
Richard MacCutchan1-Jan-18 7:36
mveRichard MacCutchan1-Jan-18 7:36 
GeneralRe: C Program to Calculate Difference Between Two Time Periods . Pin
jschell3-Jan-18 13:08
jschell3-Jan-18 13:08 
GeneralRe: C Program to Calculate Difference Between Two Time Periods . Pin
Tarun Jha1-Jan-18 13:42
Tarun Jha1-Jan-18 13:42 
Questionnon-user interface event such as a DDE, OLE Pin
_Flaviu31-Dec-17 3:25
_Flaviu31-Dec-17 3:25 
AnswerRe: non-user interface event such as a DDE, OLE Pin
Victor Nijegorodov31-Dec-17 4:09
Victor Nijegorodov31-Dec-17 4:09 
GeneralRe: non-user interface event such as a DDE, OLE Pin
_Flaviu31-Dec-17 9:59
_Flaviu31-Dec-17 9:59 
QuestionHow to Read/Write schema file .xsd in c++ Pin
brraj28-Dec-17 19:15
brraj28-Dec-17 19:15 
AnswerRe: How to Read/Write schema file .xsd in c++ Pin
Richard MacCutchan28-Dec-17 21:24
mveRichard MacCutchan28-Dec-17 21:24 
GeneralRe: How to Read/Write schema file .xsd in c++ Pin
brraj1-Jan-18 17:49
brraj1-Jan-18 17:49 
GeneralRe: How to Read/Write schema file .xsd in c++ Pin
Richard MacCutchan1-Jan-18 22:57
mveRichard MacCutchan1-Jan-18 22:57 
GeneralRe: How to Read/Write schema file .xsd in c++ Pin
brraj1-Jan-18 23:01
brraj1-Jan-18 23:01 
AnswerRe: How to Read/Write schema file .xsd in c++ Pin
jschell1-Jan-18 6:30
jschell1-Jan-18 6:30 
GeneralRe: How to Read/Write schema file .xsd in c++ Pin
brraj1-Jan-18 17:56
brraj1-Jan-18 17:56 
GeneralRe: How to Read/Write schema file .xsd in c++ Pin
jschell3-Jan-18 13:08
jschell3-Jan-18 13:08 
QuestionStruct type and memory Pin
Anonygeeker27-Dec-17 18:17
Anonygeeker27-Dec-17 18:17 
AnswerRe: Struct type and memory Pin
Richard MacCutchan27-Dec-17 21:47
mveRichard MacCutchan27-Dec-17 21:47 
QuestionRe: Struct type and memory Pin
David Crow28-Dec-17 2:52
David Crow28-Dec-17 2:52 

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.