can u tel me the errors in the following statements..please
hope for ue early reply...
1. In the first statement , ifstream is a class where as infile is an object associated with ifstream class( it will invoke the constructor for ifstream class in order to open a file in input mode !) so the statement should be used like this.
2. As we know very well in the command line argument the variable 'argc ' is as integer used to hold the number of arguments passed to main() , where as the member function
open() expects a string to open a file , not an integer !
3. The general format of 3rd statement is stream_object.open("filename" , mode);
so the given instruction finout.open(file:ios::in ....) should have to be corrected as
finout.open(file , ios::in|ios::out|ios::ate);
4.Refer 2nd point !
Prince M. Premnath.
-Happy Programming !