U
unlexx
Hello. Why? 
class mA
{
public:
int Id;
int gr_id;
string ppatch;
double p;
mA()
patch("123"){};//initializing the variables
};
int main()
{
int counter=300;
//...
mA *pma = new mA[counter-1];
while (counter--){
pma[counter].gr_id=100; //ok
pma[counter].ppatch="1"; //fault
// pma[counter].ppatch.assign(str, 0, str.length()); //fault
// std::cout << pma[counter].ppatch.c_str()<< std::endl; //fault ???
}
}
class mA
{
public:
int Id;
int gr_id;
string ppatch;
double p;
mA()
};
int main()
{
int counter=300;
//...
mA *pma = new mA[counter-1];
while (counter--){
pma[counter].gr_id=100; //ok
pma[counter].ppatch="1"; //fault
// pma[counter].ppatch.assign(str, 0, str.length()); //fault
// std::cout << pma[counter].ppatch.c_str()<< std::endl; //fault ???
}
}