Prev: Debug Assertation Failed
Next: Runtime error-help plz.
From: hamishd on 22 Jun 2007 18:31 On Jun 22, 6:57 am, "Tom Serface" <tom.nos...(a)camaswood.com> wrote: > Hi Hamishd, > > Do you have newlines in the file? The ReadString() function only reads up > until the next newline. It also has a line length of something like 128 > characters if I remember correctly. If you have that class you could try > upping that line limit, recompiling, and seeing if that fixes it. Or, if > you have newlines in the "line" you will have to use a normal CFile and > parse the lines yourself. CStdioFile and CStdioFileEx don't really know > anything about double quotes. There are no newlines. The point where it stops reading is the 2nd quote mark, 121 chars in. Other regions of the file have quote marks, it reads them ok. Just this line has the problem. Also, when I open the text file, and save as a different name, the file imports correctly.
From: Tom Serface on 23 Jun 2007 02:20 You could edit the StdioFileEx.cpp code and change the buffer size to a larger line (I think it is 128 if I remember correctly). Just make it longer than the longest line you would expect. Tom "hamishd" <Hamish.Dean(a)gmail.com> wrote in message news:1182551487.610612.271030(a)z28g2000prd.googlegroups.com... > On Jun 22, 6:57 am, "Tom Serface" <tom.nos...(a)camaswood.com> wrote: >> Hi Hamishd, >> >> Do you have newlines in the file? The ReadString() function only reads >> up >> until the next newline. It also has a line length of something like 128 >> characters if I remember correctly. If you have that class you could try >> upping that line limit, recompiling, and seeing if that fixes it. Or, if >> you have newlines in the "line" you will have to use a normal CFile and >> parse the lines yourself. CStdioFile and CStdioFileEx don't really know >> anything about double quotes. > > There are no newlines. The point where it stops reading is the 2nd > quote mark, 121 chars in. Other regions of the file have quote marks, > it reads them ok. Just this line has the problem. > > Also, when I open the text file, and save as a different name, the > file imports correctly. >
From: hamishd on 23 Jun 2007 14:29 Thanks Tom. The StdoiFileEx.cpp file is read-only. How do I change that attribute so I can adjust the buffer size. On Jun 22, 11:20 pm, "Tom Serface" <tom.nos...(a)camaswood.com> wrote: > You could edit the StdioFileEx.cpp code and change the buffer size to a > larger line (I think it is 128 if I remember correctly). Just make it > longer than the longest line you would expect. > > Tom > > "hamishd" <Hamish.D...(a)gmail.com> wrote in message > > news:1182551487.610612.271030(a)z28g2000prd.googlegroups.com... > > > > > On Jun 22, 6:57 am, "Tom Serface" <tom.nos...(a)camaswood.com> wrote: > >> Hi Hamishd, > > >> Do you have newlines in the file? The ReadString() function only reads > >> up > >> until the next newline. It also has a line length of something like 128 > >> characters if I remember correctly. If you have that class you could try > >> upping that line limit, recompiling, and seeing if that fixes it. Or, if > >> you have newlines in the "line" you will have to use a normal CFile and > >> parse the lines yourself. CStdioFile and CStdioFileEx don't really know > >> anything about double quotes. > > > There are no newlines. The point where it stops reading is the 2nd > > quote mark, 121 chars in. Other regions of the file have quote marks, > > it reads them ok. Just this line has the problem. > > > Also, when I open the text file, and save as a different name, the > > file imports correctly.- Hide quoted text - > > - Show quoted text -
From: Tom Serface on 24 Jun 2007 00:26
I'd use Explorer and right click on the file then change the Read Only attribute. Or, you can just edit the file in the IDE and it will ask if you want to overwrite the file when you go to compile it. Tom "hamishd" <Hamish.Dean(a)gmail.com> wrote in message news:1182623374.239306.136370(a)i13g2000prf.googlegroups.com... > Thanks Tom. The StdoiFileEx.cpp file is read-only. How do I change > that attribute so I can adjust the buffer size. |