🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #41687

iostream crash

#41687
From: Ian T Zimmerman
Date: Sat, 24 Feb 1996 00:00
40 lines
1418 bytes
#include <stdlib.h>
#include <iostream.h>
#include <fstream.h>
#include <ctype.h>
#include <string.h>

int main ()
{
	char blah [10];

	ifstream is ("htest.h");
  is.get(blah, 5);	/* OUCH!! */

}

Well, this baby dumps core after receiving SIGSEGV on the marked
line. What the h*ll ? System info follows; I'll be happy to tell more
to anybody who wants to help and knows what to ask.

BTW, the file "htest.h" exists, is world-readable, and 20 characters
long, terminated by a newline.

Linux 1.3.8 (ELF)
gcc/g++ 2.7.2
binutils (including libbfd) 2.6.0.2
libc.so.5.0.9
libg++.27.1.0

C programs work fine - this was the first C++ project I have
undertaken after living with this setup for a month.

HELP!!!


-- 
Ian T Zimmerman            +-------------------------------------------+
P.O. Box 13445             I    With so many executioners available,   I
Berkeley, California 94712 I suicide is a really foolish thing to do.  I
USA  <itz@rahul.net>       +-------------------------------------------+
Technical Details
Message-ID: <m2bumoz2mu.fsf@kronstadt.rahul.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: 11318c,c6b4b2927101a576,start
X-Google-Attributes: gid11318c,public
From: itz@rahul.net (Ian T Zimmerman)
Subject: iostream crash
Date: 1996/02/24
Message-ID: <m2bumoz2mu.fsf@kronstadt.rahul.net>
X-Deja-AN: 140976417
sender: itz@kronstadt.rahul.net
organization: My own fan club
newsgroups: gnu.gcc.help