home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!mcsun!news.funet.fi!funic!nntp.hut.fi!lesti.hut.fi!jkokko
- From: jkokko@lesti.hut.fi (Jari Kokko)
- Subject: Borland C++ 3.0: Using ifstream
- Message-ID: <1992Aug12.170957.11478@nntp.hut.fi>
- Summary: Novice Alert!
- Keywords: Problem with 'const unsigned char far*'
- Sender: usenet@nntp.hut.fi (Usenet pseudouser id)
- Nntp-Posting-Host: lesti.hut.fi
- Reply-To: jkokko@lesti.hut.fi (Jari Kokko)
- Organization: Helsinki University of Technology
- Date: Wed, 12 Aug 1992 17:09:57 GMT
- Lines: 35
-
- I'm fairly new to C++, so bear with me.
- I'm sure this is a problem with some silly option:
-
- Here is the code (part) that I've been working on for app. 30 hours ;<
- (I'm trying to open a file and output it to stdout).
- #include <iostream.h>
- #include <fstream.h>
-
- main() {
- ifstream inFile;
- inFile.open("file.txt");
- // Linker Error:
- // Undef'd symbol fstreambase::open(const unsigned char far*,int,int)
- // in module HUU.CPP
- // Memory model Large, Source Ansi C++
- cout << inFile;
- inFile.close();
- return 0;
- }
-
- So, what is going on in here !
-
- I've resorted to editing <fstream.h> because of the _FAR and _Cdecl
- things in there. Taking out _FAR or replacing it with far won't help,
- replace it with near I haven't tried !
-
- I've been running Borland C++ 3.0 under OS/2 2.0 and under DOS with
- most memory models. I see in _defs.h file that when __OS2__ is def'd
- _FAR is empty.
-
- Any help is welcome, reply by email, I'll post the answers I get when
- I get this to work.
- --
- //jkokko // Email: Jari.Kokko@hut.fi \\ (358)(0) 8794431 \\
- ------------------------------------------------------------
-