hi,i got the following code.it compiles welll.but when running,it gives a"debug assertion failed" error.
Code:#include <iostream>
class test{
public:
char *fileName;
test(char *r){
fileName=r;
}
~test(){
delete(fileName);
}
};
using namespace std;
void main(void){
test r("xyz");
system("pause");
}
wrong to have "delete(fileName)" ??

