I want to do somthing like this.
ifstream My_File::GetFile_Stream() const
{
return(this->Input_Stream);
}
where Input_Stream is a private member of the class My_File and is declared as follows:
ifstream Input_Stream;
When I compile I get the following errors:
/usr/include/c++/3.3.1/bits/ios_base.h: In copy constructor `
std::basic_ios<char, std::char_traits<char> >::basic_ios(const
std::basic_ios<char, std::char_traits<char> >&)':
/usr/include/c++/3.3.1/bits/ios_base.h:668: error: `
std::ios_base::ios_base(const std::ios_base&)' is private
My_File.cpp:25: error: within this context
/usr/include/c++/3.3.1/streambuf: In copy constructor `std::basic_filebuf<char,
std::char_traits<char> >::basic_filebuf(const std::basic_filebuf<char,
std::char_traits<char> >&)':
/usr/include/c++/3.3.1/streambuf:922: error: `std::basic_streambuf<_CharT,
_Traits>::basic_streambuf(const std::basic_streambuf<_CharT, _Traits>&)
[with _CharT = char, _Traits = std::char_traits<char>]' is private
My_File.cpp:25: error: within this context
I don't understand the error message either.
Thanks for any help.