yes..
my idea is just like this...
for the elements I AM GOING TO remove repeated strings.., it goes like this: string:aaaghjjfg and the result is:aghj then after removing I Am going to merge all sets and then remove duplicates...
Well, it really depends on what the OP means by saying "remove duplicates".
Using the conventional meaning for "remove duplicates" will give you the union.
#include <iostream>
usingnamespace std;
void build(char * array, int size)
{
int i;
for (i = 0; i < size; ++i)
array[i] = 'a' + i;
}
int main()
{
char my_array[20];
build(my_array, 7);
int i;
for (i = 0; i < 7; ++i)
cout << my_array[i] << endl;
return 0;
}
constchar * means pointer to const char. This means
that you are not allowed to use the pointer to modify the
char pointed to by it. If you try, your compiler will complain.