Click here to Skip to main content
15,885,757 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How is this possible? Pin
Richard MacCutchan17-May-20 22:12
mveRichard MacCutchan17-May-20 22:12 
GeneralRe: How is this possible? Pin
Richard MacCutchan19-May-20 23:55
mveRichard MacCutchan19-May-20 23:55 
AnswerRe: How is this possible? Pin
Mircea Neacsu19-May-20 3:09
Mircea Neacsu19-May-20 3:09 
PraiseRe: How is this possible? Pin
Greg Utas19-May-20 3:37
professionalGreg Utas19-May-20 3:37 
GeneralRe: How is this possible? Pin
Richard MacCutchan19-May-20 3:37
mveRichard MacCutchan19-May-20 3:37 
GeneralRe: How is this possible? Pin
Mircea Neacsu19-May-20 3:57
Mircea Neacsu19-May-20 3:57 
GeneralRe: How is this possible? Pin
Richard MacCutchan19-May-20 4:16
mveRichard MacCutchan19-May-20 4:16 
GeneralRe: How is this possible? Pin
Mircea Neacsu19-May-20 5:08
Mircea Neacsu19-May-20 5:08 
Aha! You didn't respect the requirements either: "then add a reasonable set of unit tests, with output, to main.cpp" Smile | :) If you move your main to a different CPP file you will run into errors.

The other thing I don't understand is why you mix the "T" and "t".

Otherwise your implementation is almost exactly like mine. In the invert function, I like my variable names (prev, crt, next) a bit more than yours but this is such a stylistic detail that I'm not going to argue about. I did mention it however because I'm a bit anal Smile | :) (Some people would call me an anal a..hole but that's a bit pleonastic, isn't it?).
Mircea

GeneralRe: How is this possible? Pin
Richard MacCutchan19-May-20 5:24
mveRichard MacCutchan19-May-20 5:24 
GeneralRe: How is this possible? Pin
Mircea Neacsu19-May-20 6:07
Mircea Neacsu19-May-20 6:07 
GeneralRe: How is this possible? Pin
Richard MacCutchan19-May-20 21:36
mveRichard MacCutchan19-May-20 21:36 
GeneralRe: How is this possible? Pin
Mircea Neacsu20-May-20 2:40
Mircea Neacsu20-May-20 2:40 
GeneralRe: How is this possible? Pin
Richard MacCutchan19-May-20 23:22
mveRichard MacCutchan19-May-20 23:22 
GeneralRe: How is this possible? Pin
Mircea Neacsu20-May-20 2:44
Mircea Neacsu20-May-20 2:44 
GeneralRe: How is this possible? Pin
Richard MacCutchan19-May-20 4:18
mveRichard MacCutchan19-May-20 4:18 
AnswerRe: How is this possible? Pin
Richard MacCutchan19-May-20 21:38
mveRichard MacCutchan19-May-20 21:38 
QuestionQueryPerformanceCounter Pin
Calin Negru16-May-20 2:16
Calin Negru16-May-20 2:16 
AnswerRe: QueryPerformanceCounter Pin
Greg Utas16-May-20 2:29
professionalGreg Utas16-May-20 2:29 
GeneralRe: QueryPerformanceCounter Pin
Calin Negru16-May-20 3:11
Calin Negru16-May-20 3:11 
AnswerRe: QueryPerformanceCounter Pin
Richard MacCutchan16-May-20 2:58
mveRichard MacCutchan16-May-20 2:58 
GeneralRe: QueryPerformanceCounter Pin
Calin Negru16-May-20 23:00
Calin Negru16-May-20 23:00 
GeneralProject Pin
Hayley Satjan15-May-20 0:32
Hayley Satjan15-May-20 0:32 
GeneralRe: Project Pin
Richard MacCutchan15-May-20 0:51
mveRichard MacCutchan15-May-20 0:51 
GeneralRe: Project Pin
CPallini15-May-20 1:44
mveCPallini15-May-20 1:44 
GeneralRe: Project Pin
charlieg18-May-20 12:59
charlieg18-May-20 12:59 

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.