ifstream

N

no

Hi,

A year or two ago I wrote some code that opened an ifstream like
ifstream(int) ... recently I tried recompiling this and it now complains
that the only constructor to ifstream is giving it a filename instead of an
int. Only change here is that I use a newer gcc nowadays. Any help would be
appreciated.

Thx

Lew
 
R

Rob Williscroft

wrote in in comp.lang.c++:
Hi,

A year or two ago I wrote some code that opened an ifstream like
ifstream(int) ... recently I tried recompiling this and it now
complains that the only constructor to ifstream is giving it a
filename instead of an int. Only change here is that I use a newer gcc
nowadays. Any help would be appreciated.

The newer gcc has clearly removed the *non-standard* overload
you were using.

This is the problem with non-standard code, sometimes it doesn't
even port to newer version's of the same compiler.

Ask in a gcc newsgroup ( news://gnu.gcc.help ) maybe there is
a way of turning this non-standard extension back on.

Rob.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,166
Messages
2,570,901
Members
47,442
Latest member
KevinLocki

Latest Threads

Top