Your default ctor definition (lines 22-25) would cause problems because moment you declare a DATA object it'd need to be read in from a file into a Data object that, in turn would call it's own ctor and so on ad infinitum. In this program you can just use the default compiler supplied ctor and remove the above lines
For printing to console you'd need std::ostream, std::ofstream (line 17) would be for insertion to files
For class methods like DATA::setAll(...) (line 15) const qualify the arguments, so it should be DATA::setAll(constint& k, const std::string& fname, const std::string& lname, constdouble& G)
In main() one way to read the file directly into DATA objects would be along following lines: