#include <iostream>
#include <string>
using namespace std;
char *deletechar(char*inputstr,char *outputstr)
{
char *deststr=outputstr;
bool table[26]={false};
int k=0;
for (int i=0;i<strlen(inputstr);i++)
{
char c=inputstr[i];
if (table[c-'a']==false)
{
outputstr[k++]=c;
table[c-'a']=true;
}
}
outputstr[k]=' ';
return deststr;
}
void main()
{
char str1[]="aaaabdcadjoiufdjouj";
char *deststr=new char[strlen(str1)+1];
memset(deststr,0,strlen(str1)+1);
cout<<deletechar(str1,deststr);
}