You wrote:
I'd use PERL for such tasks,
Well my only option is c++ 6.0 . But thanks.
I'm new to most of this but in past programs I used a struct but I'm unsure how to applie it to this case.
Here are the structs I'm looking at now:
Code:
struct Search : unary_function<string, bool>
{
string value;
Search(const string& val) : value (val) {}
bool operator()(const string& a)
{
if (x==1)
return a.compare(302,2,value,0,2) == 0;
else
return a.compare(502,2,value,0,2)==0;
}
};
struct compare: binary_function<string, string, bool> {
bool operator()(const string& a, const string& b)
{
return a.compare(258,12,b,258,12)<0;
}
};
Now at first this code was to search for phone numbers and remove repeats and do not calls. Well now the Search struct is sent the main file "a" and sent the string with a size of 2 which hold the keycodes like 01 05 10 20. The line increments to eventually search through all of the numbers. There is a problem however how should I change the compare struct so it doesn't erase repeats.
All I want it to do is to remove the rows that have specific keycodes there are 28 of them.
Any help would be great. Sorry for the long post