All pastes #266412 Raw Edit

Stuff

public cpp v1 · immutable
·published 2006-12-04 02:52 UTC
rendered paste body
class Zsak{    public:        Zsak();        ~Zsak();        void Add( int x );        friend ostream& operator<< (std::ostream& os, Zsak& zs);        friend Zsak operator+( const Zsak &a, const Zsak &b );    private:        list<int> zs;};std::ostream& operator<< (std::ostream& os, Zsak& zs){    list<int>::iterator i;    for( i = zs.zs.begin(); i != zs.zs.end(); i++ )        os << *i << " ";    return os;}Zsak operator+( const Zsak &a, const Zsak &b ){    Zsak ret;    list<int>::iterator i;    for( i = a.zs.begin(); i != a.zs.end(); i++ )        ret.Add( *i );}