Issues in upgrading from gcc 2.96 to 3.2.1

Michal Liptak liptak@isdd.sk
Fri Jan 24 12:13:00 GMT 2003


see the documentation on iostream library, for instance:
http://www.cplusplus.com/ref/iostream/fstream/open.html

you'll see open() has only 2 parameters..
m.

> -----Original Message-----
> From: gcc-help-owner@gcc.gnu.org 
> [mailto:gcc-help-owner@gcc.gnu.org]On Behalf Of Ajay Bansal
> Sent: Friday, January 24, 2003 12:46 PM
> To: gcc-help@gcc.gnu.org
> Subject: Issues in upgrading from gcc 2.96 to 3.2.1
> 
> 
> Hi All
> 
> I have asked a few questions since yesterday. It turns out that almost
> all of them in some way related to gcc upgradation from 2.96 to 3.2.1.
> 
> Does somebody has a comprehensive list for the same? Os some location?
> Or did has somebody faced these issues before???
> 
> By the time somebody gives me a list, I have run into another issue
> which is as follows
> 
> 
> ***********************
> Test_read.cpp
> 
> #include <iostream>
> #include <fstream>
> #include <string>
> 
>  #include <sys/types.h>
>        #include <sys/stat.h>
>        #include <fcntl.h>
> 
> using namespace std;
> 
> int main(){
>         fstream iostrm;
> 
>         iostrm.open("cintest.in", ios::out | ios::trunc, 0644);
> 
> 
>    return 0;
> }
> 
> 
> ******************
> 
> On compilation with gcc 3.2.1, I get the following error
> 
> 
> test_read.cpp: In function `int main()':
> test_read.cpp:14: no matching function for call to
> `std::basic_fstream<char, 
>    std::char_traits<char> >::open(const char[11], std::_Ios_Openmode,
> int)'
> /usr/local/include/c++/3.2.1/fstream:545: candidates are: void 
>    std::basic_fstream<_CharT, _Traits>::open(const char*,
> std::_Ios_Openmode = 
>    (std::ios_base::in | std::ios_base::out)) [with _CharT = char,
> _Traits = 
>    std::char_traits<char>]
> 
> 
> Do I simply need to change the open call to 
> 
> iostrm.open("cintest.in", ios::out | ios::trunc)
> 
> And it'll give the required results????
> 
> 
> -Ajay
> 
> 



More information about the Gcc-help mailing list