🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: de.comp.lang.c++
Article #1121

Re: Noch 'ne dumme Frage...

#1121
From: Watson
Date: Thu, 28 Dec 1995 15:32
18 lines
1022 bytes
Gernot Schwed wrote:

> printf ("\nBitte Suchstring eingeben :");
> scanf ("%i",&string1);

Versuchs mal mit 

scanf("%d",&string1);

Ansonsten ist scanf() keine sonderlich portable Funktion.
Besser gets(), fgets() und anschliessende Konvertierung
mittels atol(), atoi() o.s.Ae., was Du ja durch den Identifier
'string1' fuer einen int-value bereits bestens vorbereitet
hast :-)
-- 
*	Greetinx,
	Watson (sayegh@fokus.gmd.de)
	http://www.fokus.gmd.de/ovma/employees/sayegh/entry.html
Technical Details
Message-ID: <30E2B89A.5006@fokus.gmd.de>
Path: arc1-ca.pugleaf.net!stern.fokus.gmd.de!news
References: <4bs9on$9mm@bellona.wg.saar.de>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!stern.fokus.gmd.de!news
From: Watson <sayegh@fokus.gmd.de>
Newsgroups: de.comp.lang.c++
Subject: Re: Noch 'ne dumme Frage...
Date: Thu, 28 Dec 1995 16:32:42 +0100
Organization: GMD - Research Institute for Open Communication Systems
Message-ID: <30E2B89A.5006@fokus.gmd.de>
References: <4bs9on$9mm@bellona.wg.saar.de>
NNTP-Posting-Host: pollux.fokus.gmd.de
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 2.0b3 (X11; I; SunOS 5.4 sun4m)