๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c++.leda
Article #131

Re: Help me please...

#131
From: Wei-ju Wu
Date: Fri, 13 Oct 1995 11:50
31 lines
1218 bytes
In article <45dkb7$d0v@diable.upc.es>,
	maite <luis@mat.upc.es> writes:

>Hello, Iยดve got a similar problem.
>
>I want to read an array structure from a file in the same way,
>the first number of the line will be the size of the array.
>I use the leda type array, but my problem is that I use a class
>and I donยดt know how to implement the defenition of the " >> "
>and "<<" operators.
>
>The data input file would be something like:
>
>3; 1 2 3
>2; 2 4
>2; 4 1
>3; 1 4 2

Perhaps you should do the following after reading in the size
of the array

your_array=array<int>(size);

and then read in the values.

Wei-ju
------------------------
Wei-ju Wu
Fachbereich Informatik
Freie Universitaet Berlin
wu@inf.fu-berlin.de
Technical Details
Message-ID: <45ljpj$rn6@fu-berlin.de>
Path: arc1-ca.pugleaf.net!kojote.inf.fu-berlin.DE!not-for-mail
References: <44kfkv$mf5@taco.cc.ncsu.edu> <44oh8v$svi@fu-berlin.de> <45dkb7$d0v@diable.upc.es>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!kojote.inf.fu-berlin.DE!not-for-mail
From: wu@inf.fu-berlin.de (Wei-ju Wu)
Newsgroups: comp.lang.c++.leda
Subject: Re: Help me please...
Date: 13 Oct 1995 11:50:11 GMT
Organization: Freie Universitaet Berlin
Message-ID: <45ljpj$rn6@fu-berlin.de>
References: <44kfkv$mf5@taco.cc.ncsu.edu> <44oh8v$svi@fu-berlin.de>
  <45dkb7$d0v@diable.upc.es>
NNTP-Posting-Host: kojote.inf.fu-berlin.de (160.45.112.34)
X-Access: 16 17 19
X-Newsreader: knews 0.9.2