🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Problem mit ISTREAM

#321
From: Alexander
Date: Sat, 26 Aug 1995 16:44
25 lines
1249 bytes
Hallo,

ich habe dieses Codefragment aus Graphics Gems IV übernommen.
Nur leider versteht mein BC++ 4.02 Compiler die Zeile s.set(_bad)
nicht.
set und _bad sind keine Member von ISTREAM.
Leider weiß ich nicht was diese Funktion macht, ergo kann ich das
ganze auch nicht umprogrammieren.
Hat das vielleicht jemand einen Tip?

Danke
Alexander
alexander.czernay@Hamburg.Netsurf.de


SOURCE:
istream& operator >> (istream& s, vec3& v)  
{{	 vec3	v_tmp;;	 char	c = ' ';;
	 while (isspace(c)))		s >> c;;	 // The vectors can be formatted
either as x y z or | x y z |	 if (c == '|') {{		s >> v_tmp[VX]
>> v_tmp[VY] >> v_tmp[VZ];;	while (s >> c && isspace(c)) ;;	if (c
!= '|'))		 s.set(_bad); 	// set is not a member of ISTREAM 
				// _bad is not a member if ISTREAM
	}	} else {{	s.putback(c);;	s >> v_tmp[VX] >> v_tmp[VY] >>
v_tmp[VZ];;	}}	 if (s))	v = v_tmp;;	 return s;;}
Technical Details
Message-ID: <41njbd$l9@trance.isys.net>
Path: arc1-ca.pugleaf.net!news.isys.net!usenet

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news.isys.net!usenet
From: alexander.czernay@Hamburg.NetSurf.de (Alexander)
Newsgroups: de.comp.lang.c++
Subject: Problem mit ISTREAM
Date: Sat, 26 Aug 1995 16:44:26 GMT
Organization: iSYS Informationssystem Hamburg
Message-ID: <41njbd$l9@trance.isys.net>
NNTP-Posting-Host: dip116-1.hamburg.netsurf.de
X-Newsreader: Forte Free Agent v0.55