home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!mcsun!news.funet.fi!funic!nntp.hut.fi!vipunen.hut.fi!jkokko
- From: jkokko@vipunen.hut.fi (Jari Kokko)
- Subject: Re: Borland C++ 3.0: Using ifstream
- Message-ID: <1992Aug17.074110.5178@nntp.hut.fi>
- Summary: Thank you
- Keywords: Problem was
- Sender: usenet@nntp.hut.fi (Usenet pseudouser id)
- Nntp-Posting-Host: vipunen.hut.fi
- Reply-To: jkokko@vipunen.hut.fi (Jari Kokko)
- Organization: Helsinki University of Technology
- References: <1992Aug12.170957.11478@nntp.hut.fi>
- Date: Mon, 17 Aug 1992 07:41:10 GMT
- Lines: 33
-
- jkokko@lesti.hut.fi (Jari Kokko) wrote:
- //Any help is welcome, reply by email, I'll post the answers I get when
- //I get this to work.
-
- Well, here it is. I got many replys that were of help.
- Particularly Anto hit the nail:
-
- // inFile.open("file.txt");
- // // Linker Error:
- // // Undef'd symbol fstreambase::open(const unsigned char far*,int,int)
- ^^^^^^^^
- Anto: By any chance did you set the option to use unsigned char? If
- yes, that may be the problem. Try it with default setting (signed
- chars).
- When you've been staring at something for hours, you don't notice the
- simplest errors. UNSIGNED is the key. I had put on option [X] Unsigned
- chars (why, don't ask!), and there isn't a constructor for that in
- fstream.h. After taking out the X from there everything was peachy.
-
- Dan points out:
- Then , you can't "cout << inFile" (without overloading "<<"). That is
- like saying "cout << stdin". inFile is a stream, and there is no
- difference (in handling) between inFile and, say, cout. You would
- have to do this: cout << file.rdbuf();
-
- Thanks for these as well.
-
- //I'm sure this is a problem with some silly option
- I could say that again,
-
- --
- //jkokko // Email: Jari.Kokko@hut.fi \\ (358)(0) 8794431 \\
- ------------------------------------------------------------
-