Search code examples
c++cvisual-c++breakpoints

VS DataBreakpoints: difference between C and C++


when you set a databreakpoint in MSVS, then you put in the address and the number of bytes and finally it lets you choose betwenn "C" and "C++".

this last part i dont know what it is about? what is the difference of picking C and C++ in this situation?

thanks!


Solution

  • It only matters if you use an expression instead of entering the address directly. Parsing rules for 'C' expressions are different from those for C++. Can't think of a great example beyond a C++ member expression like "&this->member". The debugger can't figure it out for itself, mixing 'C' and C++ code in one process is quite permissible.