Click here to Skip to main content
15,916,683 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Problem with read in CFile class Pin
Chuck O'Toole22-Oct-11 9:44
Chuck O'Toole22-Oct-11 9:44 
GeneralRe: Problem with read in CFile class Pin
Richard MacCutchan22-Oct-11 21:33
mveRichard MacCutchan22-Oct-11 21:33 
GeneralRe: Problem with read in CFile class Pin
antonio34323-Oct-11 0:43
antonio34323-Oct-11 0:43 
QuestionMFC dialog + ResizableLib + splitter Pin
Dialecticus21-Oct-11 5:05
Dialecticus21-Oct-11 5:05 
AnswerRe: MFC dialog + ResizableLib + splitter Pin
Richard MacCutchan21-Oct-11 6:26
mveRichard MacCutchan21-Oct-11 6:26 
AnswerRe: MFC dialog + ResizableLib + splitter Pin
TheGreatAndPowerfulOz21-Oct-11 9:17
TheGreatAndPowerfulOz21-Oct-11 9:17 
QuestionProblem with MPR.lib/MFC90.DLL Pin
tasumisra20-Oct-11 17:41
tasumisra20-Oct-11 17:41 
AnswerRe: Problem with MPR.lib/MFC90.DLL Pin
Richard MacCutchan20-Oct-11 21:41
mveRichard MacCutchan20-Oct-11 21:41 
GeneralRe: Problem with MPR.lib/MFC90.DLL Pin
tasumisra20-Oct-11 21:58
tasumisra20-Oct-11 21:58 
GeneralRe: Problem with MPR.lib/MFC90.DLL Pin
Richard MacCutchan20-Oct-11 23:01
mveRichard MacCutchan20-Oct-11 23:01 
GeneralRe: Problem with MPR.lib/MFC90.DLL Pin
tasumisra24-Oct-11 2:03
tasumisra24-Oct-11 2:03 
GeneralRe: Problem with MPR.lib/MFC90.DLL Pin
Richard MacCutchan24-Oct-11 3:46
mveRichard MacCutchan24-Oct-11 3:46 
AnswerRe: Fix the registry Pin
Goto_Label_21-Oct-11 6:59
Goto_Label_21-Oct-11 6:59 
QuestionvString Pin
Tyler Elric20-Oct-11 16:48
Tyler Elric20-Oct-11 16:48 
AnswerRe: vString Pin
Tyler Elric20-Oct-11 16:57
Tyler Elric20-Oct-11 16:57 
AnswerRe: vString Pin
Richard Andrew x6420-Oct-11 18:02
professionalRichard Andrew x6420-Oct-11 18:02 
GeneralRe: vString Pin
Tyler Elric21-Oct-11 1:50
Tyler Elric21-Oct-11 1:50 
QuestionRe: vString Pin
Niklas L21-Oct-11 3:21
Niklas L21-Oct-11 3:21 
AnswerRe: vString Pin
Tyler Elric21-Oct-11 4:20
Tyler Elric21-Oct-11 4:20 
GeneralRe: vString Pin
Niklas L23-Oct-11 8:14
Niklas L23-Oct-11 8:14 
GeneralRe: vString Pin
Tyler Elric23-Oct-11 8:39
Tyler Elric23-Oct-11 8:39 
GeneralRe: vString Pin
Niklas L24-Oct-11 22:28
Niklas L24-Oct-11 22:28 
QuestionRegarding IntelliTrace equivalent tool in C++ Pin
ramana.g20-Oct-11 12:54
ramana.g20-Oct-11 12:54 
AnswerRe: Regarding IntelliTrace equivalent tool in C++ Pin
Luc Pattyn20-Oct-11 14:19
sitebuilderLuc Pattyn20-Oct-11 14:19 
GeneralRe: Regarding IntelliTrace equivalent tool in C++ Pin
Philippe Mori20-Oct-11 16:24
Philippe Mori20-Oct-11 16:24 
If you tell the debugger to stop on exceptions (except for a few that might be expected in your application), the debugger will stop about half of the time exactly where the problem occurs.

If you are developing native C++ application and use STL then using checked iterators will also find most misuse although if will run much more slowly in that case. Generally the performance of C++ application is more affected by debugging than C# application (or safe C++/CLI).

Very often, it is possible to just put a breakpoint at the appropriate location and find the problem really fast. You just have to learn to use the debugger. Most of the time, simply inspecting a few variable give an hint on the problem. Well, maybe with some habit...

"Edit and continue" is also very powerful as you can often correct the code as soon as the error is detected (and maybe execute the code again after ensuring it won't cause undesirable side-effect).

It is possible to compile your C++ code as managed and then see if you can use Intellitrace. In Visaul Studio 11 Ultimate Preview, it works for safe C++/CLI code... I haven't tried other options.

Adding a lot of check in code (assertions) and tracing some information also help find problems.

In my case, most of the time, assertion and validation done in libraries (STL, .NET) and the use of a debugger let me find problems relatively quickly...

Well, maybe doing .NET development and using C# for more than half my code probably do help also...
Philippe Mori

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.