Click here to Skip to main content
15,884,176 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: (C) Robust code Should an unsigned int array index be tested for "< 0" Pin
CPallini11-Jan-19 5:25
mveCPallini11-Jan-19 5:25 
GeneralRe: (C) Robust code Should an unsigned int array index be tested for "< 0" Pin
Bram van Kampen12-Jan-19 14:29
Bram van Kampen12-Jan-19 14:29 
SuggestionRe: (C) Robust code Should an unsigned int array index be tested for "< 0" Pin
David Crow11-Jan-19 5:40
David Crow11-Jan-19 5:40 
GeneralRe: (C) Robust code Should an unsigned int array index be tested for "< 0" Pin
HS_C_Student11-Jan-19 7:17
HS_C_Student11-Jan-19 7:17 
GeneralRe: (C) Robust code Should an unsigned int array index be tested for "< 0" Pin
David Crow11-Jan-19 7:33
David Crow11-Jan-19 7:33 
GeneralRe: (C) Robust code Should an unsigned int array index be tested for "< 0" Pin
Joe Woodbury11-Jan-19 11:54
professionalJoe Woodbury11-Jan-19 11:54 
GeneralRe: (C) Robust code Should an unsigned int array index be tested for "< 0" Pin
HS_C_Student11-Jan-19 12:18
HS_C_Student11-Jan-19 12:18 
GeneralRe: (C) Robust code Should an unsigned int array index be tested for "< 0" Pin
leon de boer12-Jan-19 3:36
leon de boer12-Jan-19 3:36 
What you are ignoring is the code is invalid and would fail any software audit .. you handed that junk to me and I would sack you.

What you are ignoring if you turn the compiler warning levels to max then your code won't compile .. it will give you a fatal error. At half-arse programmer wannabe settings it probably just gives you a warning about passing a signed integer into an unsigned integer interface.

However in the real commercial world you run the compiler settings max and your code must not invoke any warning at all. Any good university when you submit your code for evaluation will have the compiler set to max you generate a warning you fail.
In vino veritas

GeneralRe: (C) Robust code Should an unsigned int array index be tested for "< 0" Pin
HS_C_Student12-Jan-19 4:59
HS_C_Student12-Jan-19 4:59 
AnswerRe: (C) Robust code Should an unsigned int array index be tested for "< 0" Pin
Bram van Kampen12-Jan-19 14:01
Bram van Kampen12-Jan-19 14:01 
GeneralRe: (C) Robust code Should an unsigned int array index be tested for "< 0" Pin
HS_C_Student12-Jan-19 16:50
HS_C_Student12-Jan-19 16:50 
GeneralRe: (C) Robust code Should an unsigned int array index be tested for "< 0" Pin
Richard MacCutchan12-Jan-19 22:51
mveRichard MacCutchan12-Jan-19 22:51 
GeneralRe: (C) Robust code Should an unsigned int array index be tested for "< 0" Pin
HS_C_Student13-Jan-19 7:10
HS_C_Student13-Jan-19 7:10 
GeneralRe: (C) Robust code Should an unsigned int array index be tested for "< 0" Pin
Richard MacCutchan13-Jan-19 22:12
mveRichard MacCutchan13-Jan-19 22:12 
AnswerDemonstrating the relevant case and potential best practice Pin
HS_C_Student13-Jan-19 6:46
HS_C_Student13-Jan-19 6:46 
GeneralRe: Demonstrating the relevant case and potential best practice Pin
Richard MacCutchan13-Jan-19 22:15
mveRichard MacCutchan13-Jan-19 22:15 
AnswerRe: (C) Robust code Should an unsigned int array index be tested for "< 0" Pin
Stefan_Lang16-Jan-19 23:13
Stefan_Lang16-Jan-19 23:13 
GeneralRe: (C) Robust code Should an unsigned int array index be tested for "< 0" Pin
HS_C_Student17-Jan-19 13:05
HS_C_Student17-Jan-19 13:05 
Questionacademic question - usage of class variable Pin
Vaclav_10-Jan-19 5:20
Vaclav_10-Jan-19 5:20 
AnswerRe: academic question - usage of class variable Pin
Richard MacCutchan10-Jan-19 6:27
mveRichard MacCutchan10-Jan-19 6:27 
AnswerRe: academic question - usage of class variable Pin
CPallini10-Jan-19 21:28
mveCPallini10-Jan-19 21:28 
GeneralRe: academic question - usage of class variable Pin
Vaclav_11-Jan-19 3:25
Vaclav_11-Jan-19 3:25 
GeneralRe: academic question - usage of class variable Pin
CPallini11-Jan-19 5:21
mveCPallini11-Jan-19 5:21 
GeneralRe: academic question - usage of class variable Pin
David Crow11-Jan-19 5:44
David Crow11-Jan-19 5:44 
AnswerRe: academic question - usage of class variable Pin
Stefan_Lang16-Jan-19 22:26
Stefan_Lang16-Jan-19 22:26 

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.