first: you are returning add(f, true, false). doesn't add return an int? the reason operator<< returns IO_FORM& is to make the following series of add possible: IO_FROM& F; F<<new IO_Label(....)<<new IO_CheckList(.....)<<new IO_...; so each operator<< returns the IO_Form& for next one to use. So; in your function instead of returning add, just call add and then return "*this" ... add(f, true, false); return *this; }
first: you are returning add(f, true, false). doesn't add return an int?
ReplyDeletethe reason operator<< returns IO_FORM& is to make the following series of add possible:
IO_FROM& F;
F<<new IO_Label(....)<<new IO_CheckList(.....)<<new IO_...; so each operator<< returns the IO_Form& for next one to use.
So; in your function instead of returning add, just call add and then return "*this"
...
add(f, true, false);
return *this;
}