#include<fstream.h>
#include<string.h>
using namespace std;
class emp
{
public:
char *per;
void write()
{
ofstream out("ss.txt",ios::app | ios::binary);
cout<<"Enter some character ....\n";
cin>>*per;
//out.write(per,sizeof(per));
out.write(per,strlen(per));
}
};
void main()
{
emp e;
e.write();
}
Why this is not working?