🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: att.lang.c++
Article #91

more strtok()

#91
From: Henry Zektser
Date: Sat, 13 May 2000 00:00
10 lines
1205 bytes
Ok, I know I'm harassing everyone with this one function, but nothing else
gives me any trouble. At the moment I'm using ifstream::getline() to read a
file line by line into a char*, which I'm using a strtok() call on, with the
separators being ' \n' (space and newline) and maxchars being far bigger
than the width of the file. It works fine, unless I leave a blank line (hit
enter twice in notepad, and save). Then it gives me an access violation
error. What exactly does getline return in this case, and/or why isnt strtok
handling it correctly?

H
Technical Details
Message-ID: <8fl05p$96l$1@bob.news.rcn.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10d4ba,8c804c30a79cfe3c
X-Google-Attributes: gid10d4ba,public
X-Google-Thread: 109fba,8c804c30a79cfe3c
X-Google-Attributes: gid109fba,public
From: "Henry Zektser" <kdentdev@hotmail.com>
Subject: more strtok()
Date: 2000/05/13
Message-ID: <8fl05p$96l$1@bob.news.rcn.net>
X-Deja-AN: 623112004
X-Trace: DfO9/1SdVb2yXWfg3ydarmZ76mUblH+lXvmBDz0dfvQnUIHoKfieeQ==
X-Priority: 3
X-MSMail-Priority: Normal
NNTP-Posting-Date: 14 May 2000 01:40:09 GMT
Newsgroups: att.lang.c++,comp.lang.c++
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
X-Complaints-To: abuse@rcn.com