fstream library error

Ok i am making an encryption and decryption program using fstream.h so that i can encode and decode files. This is the line with an error:

1
2
3
4
 while(ToCode.get(Char)){ // <-- This is the line
			var = ((int(Char)*2)-97);
			CodedChar = char(var);
			Coded << CodedChar;} 


and this is the error report i get from it:

1
2
3
4
5
6
7
 
1>c:\users\xavier banks\documents\visual studio 2008\projects\cyphede\cyphede\end.cpp(90) : error C2663: 'std::basic_istream<_Elem,_Traits>::get' : 6 overloads have no legal conversion for 'this' pointer
1>        with
1>        [
1>            _Elem=char,
1>            _Traits=std::char_traits<char>
1>        ] 


and then there is this other error that has something to do with the fstream library

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
1>c:\program files\microsoft visual studio 9.0\vc\include\fstream(676) : 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\microsoft visual studio 9.0\vc\include\ios(151) : 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_ifstream<_Elem,_Traits>::basic_ifstream(const std::basic_ifstream<_Elem,_Traits> &)'
1>        with
1>        [
1>            _Elem=char,
1>            _Traits=std::char_traits<char>
1>        ] 


All Help is apreciated
Thanks :-)
Topic archived. No new replies allowed.