the code below is a close parallel to the code which is generating an
error I am trying to fix. the error is refereeing to the line in the
code marked <<<<<<<<<<<<< <.
can you please tell if the code is correct?
thanks
#include <string>
using std::string;
#include <vector>
using std::vector;
#include <fstream>
using std::ofstream;
class Ot {
static ofstream combo;
ofstream deta_f;
void some_method();
public:
Ot::Ot(string s){
combo.open( "file.txt", ios::app );
deta_f.open( s.c_str(), ios::app );
}
void Ot::some_method (){
deta_f << "...";
combo << "...";
}
};
class Grd {
Ot ot;
public:
Grd(string s):ot(s){}
};
class Grp {
vector<Grdgrds;
void group_them(){
Grd grd("something" );
grds.push_back( grd); //<<<<<<<<<<<<<<< <<<<<<
}
public:
Grp(){}
~Grp(){}
};
Comment