Click here to Skip to main content
15,888,802 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Dialog box margins Pin
Maximilien23-Feb-19 1:49
Maximilien23-Feb-19 1:49 
GeneralRe: Dialog box margins Pin
leon de boer23-Feb-19 4:30
leon de boer23-Feb-19 4:30 
AnswerRe: Dialog box margins Pin
leon de boer22-Feb-19 5:37
leon de boer22-Feb-19 5:37 
GeneralRe: Dialog box margins Pin
Alexander Kindel22-Feb-19 9:04
Alexander Kindel22-Feb-19 9:04 
GeneralRe: Dialog box margins Pin
leon de boer22-Feb-19 10:00
leon de boer22-Feb-19 10:00 
SuggestionRe: Dialog box margins Pin
David Crow24-Feb-19 16:23
David Crow24-Feb-19 16:23 
QuestionTraceability of Dynamic Memory Allocation Faults Pin
HS_C_Student16-Feb-19 22:24
HS_C_Student16-Feb-19 22:24 
AnswerRe: Traceability of Dynamic Memory Allocation Faults Pin
leon de boer17-Feb-19 20:53
leon de boer17-Feb-19 20:53 
When you code reaches a certain complexity you have to stop and implement test benches on each unit file .. I take it you are not doing so.
At the moment you are treating the symptoms not the cause.

Put simply your
CreateObj(data)
Do work;;;
FreeObj(data)

Should be known to work bug free because it passes your benchtest unit with clear use guideline API

One of the things writing the bench test unit does is makes you stop and think about possible errors because you try to bench test the errors.
Your bench test code should obviously include malloc failing and all memory writes should be checked for size in the benchtest. So put bluntly
your code is failing because you are failing to test properly.

For even larger projects especially if threaded it often becomes necessary to use a MOCK framework to actually cross test the units together.
Typical test frameworks are listed in the C section of
List of unit testing frameworks - Wikipedia[^]
The more common ones are CMock, Ceedling and Unity.

If you have never run across this before it is worth a look at a good tutorial like
Unit-testing (embedded) C applications with Ceedling [Dmitry Frank][^]
In vino veritas


modified 18-Feb-19 2:58am.

AnswerRe: Traceability of Dynamic Memory Allocation Faults Pin
Stefan_Lang18-Feb-19 0:15
Stefan_Lang18-Feb-19 0:15 
AnswerRe: Traceability of Dynamic Memory Allocation Faults Pin
jschell23-Feb-19 10:41
jschell23-Feb-19 10:41 
QuestionCeratingNameePipe Server Application Using C++ Classes Pin
Member 1271142615-Feb-19 0:23
Member 1271142615-Feb-19 0:23 
AnswerRe: CeratingNameePipe Server Application Using C++ Classes Pin
Victor Nijegorodov15-Feb-19 1:03
Victor Nijegorodov15-Feb-19 1:03 
GeneralRe: CeratingNameePipe Server Application Using C++ Classes Pin
Member 1271142615-Feb-19 4:53
Member 1271142615-Feb-19 4:53 
GeneralRe: CeratingNameePipe Server Application Using C++ Classes Pin
Richard Andrew x6415-Feb-19 13:48
professionalRichard Andrew x6415-Feb-19 13:48 
GeneralRe: CeratingNameePipe Server Application Using C++ Classes Pin
Victor Nijegorodov15-Feb-19 13:53
Victor Nijegorodov15-Feb-19 13:53 
GeneralRe: CeratingNameePipe Server Application Using C++ Classes Pin
Richard Andrew x6415-Feb-19 14:11
professionalRichard Andrew x6415-Feb-19 14:11 
GeneralRe: CeratingNameePipe Server Application Using C++ Classes Pin
Victor Nijegorodov15-Feb-19 14:18
Victor Nijegorodov15-Feb-19 14:18 
AnswerRe: CeratingNameePipe Server Application Using C++ Classes Pin
Richard MacCutchan15-Feb-19 3:18
mveRichard MacCutchan15-Feb-19 3:18 
GeneralRe: CeratingNameePipe Server Application Using C++ Classes Pin
Member 1271142615-Feb-19 4:55
Member 1271142615-Feb-19 4:55 
QuestionWants guidance. Pin
Member 1415146014-Feb-19 23:46
Member 1415146014-Feb-19 23:46 
AnswerRe: Wants guidance. Pin
CPallini15-Feb-19 1:45
mveCPallini15-Feb-19 1:45 
QuestionSelected Row while updating in CListCtrl in MFC Pin
Anu_Bala13-Feb-19 22:29
Anu_Bala13-Feb-19 22:29 
AnswerRe: Selected Row while updating in CListCtrl in MFC Pin
Victor Nijegorodov14-Feb-19 1:24
Victor Nijegorodov14-Feb-19 1:24 
QuestionHow to resolve: error LNK2001: unresolved external symbol "public: static void * Pin
mlong3013-Feb-19 20:10
mlong3013-Feb-19 20:10 
AnswerRe: How to resolve: error LNK2001: unresolved external symbol "public: static void * Pin
Victor Nijegorodov13-Feb-19 21:34
Victor Nijegorodov13-Feb-19 21:34 

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.