Initializing fstream object inside another dynamically allocated object in C++
===

I have a custom structure datatype defined as below which contains an fstream object to be used as a file handle.

    struct filebuffer{      //structure to hold info abt temp file buffers;
    			T* fbhead;
    			char fname[L_tmpnam];
    			int fbsize;
    			std::fstream fbhandle;
    		}*fbtable;

Now, I am dynamically allocating an array(`fbtable`) of these structure objects and intialising the various fields element-by-element inside a loop. I would like to know how to open a file with the `fbhandle` object . 

Using the `open()` method straightaway like this:

    fbtable[i].fbhandle.open(fbtable[i].fname,std::ios::in|std::ios::binary);

gives me the following error in MS VC++

        1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\fstream(1347): error C2248: 'std::basic_ios<_Elem,_Traits>::basic_ios' : cannot access private member declared in class 'std::basic_ios<_Elem,_Traits>'
    1>          with
    1>          [
    1>              _Elem=char,
    1>              _Traits=std::char_traits<char>
    1>          ]
    1>          c:\program files (x86)\microsoft visual studio 10.0\vc\include\ios(176) : see declaration of 'std::basic_ios<_Elem,_Traits>::basic_ios'
    1>          with
    1>          [
    1>              _Elem=char,
    1>              _Traits=std::char_traits<char>
    1>          ]
    1>          This diagnostic occurred in the compiler generated function 'std::basic_fstream<_Elem,_Traits>::basic_fstream(const std::basic_fstream<_Elem,_Traits> &)'
    1>          with
    1>          [
    1>              _Elem=char,
    1>              _Traits=std::char_traits<char>
    1>          ]

 
If I cannot use the `open()` method, and `fstream` does not have a default constructor, how do I go about doing this ?
 
EDIT :

I found that this error is generated if one tries to copy and fstream object. But I cant figure out where the copy operation is taking place here .
