I am trying to overload "<<" operator to call 2 methods but compiler gives me an error:
invalid initialization of non-const reference of type 'std::ostream&' 
{aka 'std::basic_ostream<char>&' from an rvalue of type 'void'
        return v.init();
Here is my class definition:
template<class T>
class Vector
{
private:
    std::vector<T> _Vec;
public:
    void fillVector();
    void printElements();
    void init() { fillVector(); printElements(); }
    friend std::ostream& operator<<(std::ostream& os, Vector& v) {
            return v.init();    
};
How can I fix it?
 
     
    