Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: O-san on March 29, 2009, 07:00:52 pm
-
Hello!
I’ve got a problem with code completion and the watch window. I’d be very grateful if anyone could tell me how I can see class members of a list::iterator in the watch? I thought this would work:
It->mValue
But it does not. Instead I get this message in the watch result “There is no member or method named mValue”. The code completion that lets you choose between the different class members in a dropdown list does not work either. There are however no compilation errors.
-
Found this bug description for gdb http://sourceware.org/bugzilla/show_bug.cgi?id=8722 (http://sourceware.org/bugzilla/show_bug.cgi?id=8722).
So it turns out that the bug is outside code::blocks scope. Their "solution" proposed works reasonably well also.
Mod: feel free to remove topic.
-
Mod: feel free to remove topic.
No, because it shows a solution, that can help other users too.
In short instead of trying it->mValue , you should try (*it).mValue .
It seems to be a gdb-bug with overloaded "->"-operators.