Conditional breakpoints in Visual C++ 2005

Hello, I have some troubles with using conditional breakpoints in Visual C++. It works fine with simple types(such as int, char, etc), but I can't set up conditions that use objects when they evaluates. For example when I try to add condition for std::string str, like:
(str == "qwe")
I have such message: http://img35.imageshack.us/img35/6154/89715383.png
Using:
operator== (str, "qwe") or str.operator ==("qwe")
has no result too.
Does anybody knows how should I use conditional breakpoints with std::string and other objects?
Last edited on
str is an std::string, right? The conditional breakpoint evaluator can only evaluate simple expressions. You can't make function calls or run any code from it. If you need to do something like that, you can put a check in the code and an unconditional breakpoint in the true block.
1
2
3
if (str=="qwe"){
    //Innocuous operation here. Breakpoint here.
}
Topic archived. No new replies allowed.