Subj : Re: Returning structures from template classes To : borland.public.cpp.borlandcpp From : DJV Date : Mon Oct 03 2005 04:16 pm Thanks. I see your point. Of course, this provides the functionality I need, and its done. I'll perceive the integer "success" variable as describing whether the matrix can be inverted in the sense of the matrix as an "object". I may change the variable to "inverts" instead. maeder@glue.ch (Thomas Maeder [TeamB]) wrote: >"DJV" writes: > >> I added a "success" unsigned integer variable, then modified the >> contructor code and the code to set one matrix equal to another to >> include it. I can now send an indication of success or failure with >> the matrix that is being returned. > >First of all, a variable indicating a value of true or false should be >of a boolean type. I don't think that the compiler you are using >supports bool yet, but you should use typedef to declare a name that >better conveys the semantics of such variables. > >Second, if this means that you added a success variable to the matrix >type (or template), note that this is a bad idea. Matrices don't >succeed or fail; inversion does. .