Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] using getline() function for Alg_point_2 type

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] using getline() function for Alg_point_2 type


Chronological Thread 
  • From: Laurent Rineau <>
  • To:
  • Subject: Re: [cgal-discuss] using getline() function for Alg_point_2 type
  • Date: Sun, 30 Dec 2007 18:24:58 +0100
  • Organization: Inria, Sophia Antipolis, FRANCE

On Sunday 30 December 2007 12:05:15 Mahmood NT wrote:
> Hello,
> I want to read a point with Alg_point_2 type from a file.
> suppose in file I have:
> 2 5
> 3 9
> ...
>
> and in program I want to do something like this:
> Alg_point_2 p;
> ifile.getline( p, ???? );

If your file contains formated data, you should use STL IO operators:
ifile >> p;
instead of getline. You should use getline only to read strings or binary
data.

Best wishes for 2008.

--
Laurent Rineau
INRIA - Sophia Antipolis
BP 93, 2004 Route des Lucioles
06902 Sophia Antipolis Cedex FRANCE
Tel: +33 4 92 38 78 62 (Fax: +33.4.97.15.53.95)



Archive powered by MHonArc 2.6.16.

Top of Page