User forums > General (but related to Code::Blocks)

Where is the problem? My code? GCC? CodeBlocks?

<< < (2/2)

cecilio:
Thank you for answering. I'm still fighting with this issue.

> P.S. - Yes, wrong forum but damage is done.

Sorry again. But I would appreciate a more positive feedback: where should i have posted this question?
Announcements? Not an announcement
Using Code::Blocks? Not a question about the usage of Code::Blocks
Embedded development? Nop
Nightly builds? Nop

So IMHO only two options:

Help [Code::Blocks installation/troubleshooting issues]
General (but related to Code::Blocks)

I thought that Help forum was perhaps more oriented to CB installation issues so I decided (wrongly, I see) to post to General forum. I thought that my problem could be some issue with Code::Blocks debugger.

Really, Which forum should I have used?

Never mind. Sorry for all the damage. Please delete this topic. Thank you.

herrtool:
I didn't mean to offend you.  I don't mind that you posted the question.  What I meant was that I was hoping that admins don't mind that I give you a pointer on your problem.


--- Code: ---void EventNotifier::notify_observers(SpEventInfo pEvent, Observable* target)
{
    std::list<Observer*>::iterator it;
    for (it = m_observers.begin(); it != m_observers.end(); ++it)
    {
        Observable* observedTarget = (*it)->target();
        bool fNotify = (observedTarget == target);
        ...

--- End code ---

replace


--- Code: ---bool fNotify = (observedTarget == target);

--- End code ---

with


--- Code: ---bool fNotify = (*observedTarget == *target);

--- End code ---

If you get a compiler error then you need to define a function that's visible to your function above.


--- Code: ---bool operator==(const Observable& left, const Observable& right)
{
  return left.foo_member_data_stuff == right.foo_member_data_stuff;
}

--- End code ---

p2rkw:
@OP: Why you cast these pointers in watch window to lomse::lmoLink* ? Cast them to void* to see their real value. And don't use c style cast while using multiple inheritance. Use static_cast and dynamic_cast instead.

MortenMacFly:
Topic locked as it violates the forum rules. Nevertheless, enough hints are given anyways...

Navigation

[0] Message Index

[*] Previous page

Go to full version