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

C / C++ / MFC

 
GeneralRe: Convert to ASCII ? Pin
Vaclav_1-Aug-15 9:40
Vaclav_1-Aug-15 9:40 
GeneralRe: Convert to ASCII ? Pin
Richard MacCutchan1-Aug-15 21:00
mveRichard MacCutchan1-Aug-15 21:00 
GeneralRe: Convert to ASCII ? Pin
CPallini2-Aug-15 6:56
mveCPallini2-Aug-15 6:56 
QuestionEfficient way of converting an 8bit array of grayscale pixel data into 24bpp bitmap for GDI+? Pin
Kiran Satish31-Jul-15 8:39
Kiran Satish31-Jul-15 8:39 
QuestionRe: Efficient way of converting an 8bit array of grayscale pixel data into 24bpp bitmap for GDI+? Pin
CPallini31-Jul-15 21:40
mveCPallini31-Jul-15 21:40 
AnswerRe: Efficient way of converting an 8bit array of grayscale pixel data into 24bpp bitmap for GDI+? Pin
Jochen Arndt31-Jul-15 21:51
professionalJochen Arndt31-Jul-15 21:51 
GeneralPassing an "array" in C Pin
PIEBALDconsult31-Jul-15 7:41
mvePIEBALDconsult31-Jul-15 7:41 
GeneralRe: Passing an "array" in C Pin
k505431-Jul-15 7:55
mvek505431-Jul-15 7:55 
Which method you use depends on what your data looks like. If you have an array of int, then there may not be a special value that can be the sentinel for the end of the array. On the other hand if you have an array of pointers to something, then maybe a NULL pointer is a good choice as a sentinel. Not always, though. If you had an sparse array of pointers, it would be conventional for the empty elements to be NULL, so you could not use that as the sentinel.

Advantages to passing the length are that you can work your way forwards or backwards through the array without having to count how many first, and you know the bounds, so you shouldn't have any Undefined Behaviour from trying to access outside the array.
GeneralRe: Passing an "array" in C Pin
PIEBALDconsult31-Jul-15 8:34
mvePIEBALDconsult31-Jul-15 8:34 
SuggestionRe: Passing an "array" in C Pin
camycentsolutions2-Aug-15 19:36
camycentsolutions2-Aug-15 19:36 
GeneralRe: Passing an "array" in C Pin
Chris Losinger31-Jul-15 9:50
professionalChris Losinger31-Jul-15 9:50 
GeneralRe: Passing an "array" in C Pin
PIEBALDconsult31-Jul-15 10:48
mvePIEBALDconsult31-Jul-15 10:48 
GeneralRe: Passing an "array" in C Pin
PIEBALDconsult31-Jul-15 14:17
mvePIEBALDconsult31-Jul-15 14:17 
GeneralRe: Passing an "array" in C Pin
PIEBALDconsult1-Aug-15 21:18
mvePIEBALDconsult1-Aug-15 21:18 
GeneralRe: Passing an "array" in C Pin
Chris Losinger2-Aug-15 3:52
professionalChris Losinger2-Aug-15 3:52 
GeneralRe: Passing an "array" in C Pin
PIEBALDconsult2-Aug-15 6:36
mvePIEBALDconsult2-Aug-15 6:36 
GeneralRe: Passing an "array" in C Pin
Chris Losinger2-Aug-15 7:06
professionalChris Losinger2-Aug-15 7:06 
GeneralRe: Passing an "array" in C Pin
PIEBALDconsult2-Aug-15 7:17
mvePIEBALDconsult2-Aug-15 7:17 
GeneralRe: Passing an "array" in C Pin
PIEBALDconsult4-Aug-15 15:06
mvePIEBALDconsult4-Aug-15 15:06 
GeneralRe: Passing an "array" in C Pin
Chris Losinger5-Aug-15 1:20
professionalChris Losinger5-Aug-15 1:20 
GeneralRe: Passing an "array" in C Pin
k50545-Aug-15 4:22
mvek50545-Aug-15 4:22 
GeneralRe: Passing an "array" in C Pin
CPallini31-Jul-15 21:32
mveCPallini31-Jul-15 21:32 
GeneralRe: Passing an "array" in C Pin
PIEBALDconsult1-Aug-15 5:00
mvePIEBALDconsult1-Aug-15 5:00 
GeneralRe: Passing an "array" in C Pin
CPallini1-Aug-15 5:13
mveCPallini1-Aug-15 5:13 
GeneralRe: Passing an "array" in C Pin
PIEBALDconsult1-Aug-15 5:40
mvePIEBALDconsult1-Aug-15 5:40 

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.