//输入一个字符串,求出该字符串的字符集(去掉已经重复的字符)
#include<iostream>
using namespace std;
void Characters(char *string)
{
if(string == NULL)
return;
const int tablesize = 256;
unsigned int hashtable[tablesize];
for(unsigned int i = 0;i<tablesize;++i)
hashtable[i] = 0;
while(*string !='\0')
{
if(hashtable[*string] == 0)
{
cout<<*string;
hashtable[*string]++;
}
string++;
}
}
void main()
{
char s[]="abcqweracb";
Characters(s);
}