Next: , Previous: Applying a function to a realvec, Up: Realvec


7.3.5 Realvec input and output to a file

     /* you can do
     realvec foo;
     ...
     cout<<foo;
     file<<foo;
     */
     friend std::ostream& operator<<(std::ostream&, const realvec&);
     friend std::istream& operator>>(std::istream&, realvec&);
     
     
     // does the "file<<foo" method
     void write(std::string filename) const;
     void read(std::string filename);
     
     
     // input/output functions for line-separated text files
     void readText(std::string filename);
     void writeText(std::string filename);