if you change Code: cout<< a; to Code: b_file<< a; this program would append the first line of a_file to b_file. Kurt
cout<< a;
b_file<< a;