grazie, così funziona mi ero incasinato perchè avevo dichiarato la string const in questo modo:
codice:
#include "MyException.h"
#include <string>
#include <iostream>
using namespace std;
MyException::MyException(){
string bad;
bad = "err";
this->erBadIO = &bad;
}
MyException::~MyException(){}
void MyException::setErBadIO(const string* msg){
this->erBadIO = msg;
}
void MyException::showErBadIO(){
cout << this->getErBadIO() << endl;
}
string * MyException::getErBadIO(){
return this->erBadIO;
}
codice:
#include <string>
using namespace std;
class MyException{
private:
const string* erBadIO;
public:
MyException();
virtual ~MyException();
string * getErBadIO();
void showErBadIO();
void setErBadIO(const string* msg);
};
se faccio come mi hai detto il metodo getErBadIO mi da un errore di casting...
grazie