On Thu, 29 Aug 2002, Ferguson, Neale wrote:
Didn't anyone ever tell you to use a subject?;-)
> I am a C++ dummy so can any one tell me what I should look for to fix the
> following. The code says:
>
> void CallStack::Output(ostream &os)
> {
>
> total_time = data.total_time();
>
> for (ProfileData::const_arc_iterator i = data.begin_roots();
> i != data.end_roots(); ++i)
> {
> os << root << ' ' << get_func_time(*i) << '\n';
> output_node(os, *i, 1);
> }
> }
>
> The compiler bitches:
>
> callstack.C: In member function `void CallStack::Output(std::ostream&)':
> callstack.C:83: no match for `ProfileData::const_arc_iterator& !=
> ProfileData::const_arc_iterator' operator
>
If you'd use the cat command to format a listing:
cat -n callstack.C | less
then it would be clearer just which line g++ is complaining about.
I'm not much at C++ either, but I don't see any other reply yet.
Precisely how is data.begin_roots() defined? Are you missing an ampersand?
--
Cheers
John.
Please, no off-list mail. You will fall foul of my spam treatment.
Join the "Linux Support by Small Businesses" list at
http://mail.computerdatasafe.com.au/mailman/listinfo/lssb