How to overwriting 2 files in 2 arrays and merge them into one

Hi!
I need some help with my code. I made 2 files .They consist info about telephone numbers and pulses. Now I must overwriting them in 2 arrays and merge them into one sorted by pulses.

Last edited on
I need some help with my code
You need to be more specific.

What help do you need?
What's wrong with your code?
I can't sort my array by brimpulsi (pulses) . Here is my code
tel1 masiv[100]; tel1 *temp;
int m=a+b;
int d,c,flag;
do {
flag=0;
for (d = 0; d <m; d++)
for (c=m-1; c>d; c--)
{
if (!strcmp(masiv[d].brimpulsi, masiv[d+1].brimpulsi) < 0)
{
temp[d]= masiv[d];
masiv[d] = masiv[d+1];
masiv[d+1] = temp[d];
flag=1;
}
}
} while(flag);
for(d=0;d<m;d++)
{
cout<<"\n Pulses sort "<<d+1<<":"<<masiv[d].telnum<<"\t"<<masiv[d].brimpulsi<<endl;
}
Topic archived. No new replies allowed.