队列与文件合并的概念.能给个帮助吗?该怎么解决

队列与文件合并的概念.能给个帮助吗?
现在上课在讲c语言的   队列   与   文件合并   的概念,我不是很懂,有谁精通这个方面的话.就给我一点帮助吧.有例题吗?给我解释一下好吗?
队列   与   文件合并:

------解决方案--------------------
//文件合并,就是把两个文件中的内容合并到第三个文件中,下面这个程序可以看一下
#include <iostream>
#include <fstream>
using namespace std ;

class CFile
{
private:
fstream inf , ouf ;
char file1[ 20 ] , file2[ 20 ] ;
public:
CFile() ;
~CFile() ;
void CFile_cat() ;
void CFile_write() ;
} ;
CFile::CFile()
{
cout < < "Frist: " ;
cin > > file1 ;
cout < < "Second: " ;
cin > > file2 ;
inf.open( file1 , ios::in , 0 ) ;
if( !inf )
{
cout < < "Can 't open file! " ;
return ;
}
ouf.open( file2 , ios::in|ios::out , 0 ) ;
if( !ouf )
{
cout < < "Can 't creata file! " ;
return ;
}

return ;
}
CFile::~CFile()
{
inf.close() ;
ouf.clear() ;
}
void CFile::CFile_cat()
{
char ch ;
ouf.seekp( 0 , ios::end ) ;
inf.get( ch ) ;
while( !inf.eof() )
{
ouf.put( ch ) ;
inf.get( ch ) ;
}
return ;
}
void CFile::CFile_write()
{
char ch ;
ouf.seekp( 0 ) ;
ouf.get( ch ) ;
while( !ouf.eof() )
{
cout < < ch ;
ouf.get( ch ) ;
}
return ;
}
int main()
{
CFile D ;
D.CFile_cat() ;
D.CFile_write() ;
return 0 ;
}