Re: [Dev-C++] <incomplete type> shown in the debugger
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Per W. <pw...@ia...> - 2007-08-01 13:26:56
|
Check if you have an invalid file name - you fail to open the file. I would guess that the incomplete file type is caused by the data type ifstream being based on a template (basic_ifstream<char>) /pwm On Wed, 1 Aug 2007, Wagner, Frank wrote: > Hi all, > > I did somthing like: > > <-- > #include <fstream> > > int=09=09len; > ifstream=09instream; > > instream.open(Filename.c_str(), ios::binary); > > instream.seekg(0, ios::end); > len =3D instream.tellg(); > instream.seekg(0, ios::beg); > > --> > > This compiles well but when I run this in the debugger I get instream as > <incomplete type> > and the the instream.tellg(); will return a -1. > > This is taken from a exampler at: > http://www.cplusplus.com/reference/iostream/istream/tellg.html > > Has the incorrect len something to do with these incomplete type thing? > > How might I solve the problem? > > Thanks in advance > > Frank > -- > WIKA Alexander Wiegand GmbH & Co. KG > Alexander-Wiegand-Stra=DFe 30 - 63911 Klingenberg - Germany > Kommanditgesellschaft: Sitz Klingenberg - Amtsgericht Aschaffenburg HRA 1= 819 > Komplement=E4rin: WIKA Alexander Wiegand Verwaltungs GmbH - Sitz Klingenb= erg - > Amtsgericht Aschaffenburg HRB 306 > Gesch=E4ftsf=FChrer: Alexander Wiegand > Telefon: (09372) 132-0 > Internet: www.wika.com > -- > The information contained in this E-mail and any attached files are stric= tly confidential and may be subject to legal privilege. If you are not the = intended recipient, his representative or the person responsible for delive= ring the message to the intended recipient, be advised that you have receiv= ed this message in error and that any dissemination, copying or use of this= message or attachment is strictly forbidden, as is the disclosure of the i= nformation therein. If you have received this E-mail in error, please notif= y us immediately by E-mail or telephone and delete this message and all its= attachments subsequently. All reasonable precautions have been taken to en= sure no viruses are present in this E-mail. > > |