Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] can not call a function taht takes Alg_point_2

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] can not call a function taht takes Alg_point_2


Chronological Thread 
  • From: Mahmood NT <>
  • To:
  • Subject: Re: [cgal-discuss] can not call a function taht takes Alg_point_2
  • Date: Fri, 4 Jan 2008 02:54:20 -0800 (PST)
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Message-ID; b=t8YYAbtcdo1854W4k8ShT2UqPwub9VxoW9MSf3c7rNj8TPU7Y0AIKafAb2to3lSRKUZ3x+OuScsbLT0eQehq8sH4zbcmpPqXqrA51lbMnOFq9ln3aFD7fc/hU0RSIjCJ3fox+AruzwAHLo7wTBfTBQDgXqnjuN51gB4p7LBnShY=;

>You should use const a little more. All the variables of isShorter can be
>const, in your code. Do you know the "C++ FAQ"? It is a nice source of
>information. As for the uses of const, you can read that page:

>http://www.parashift.com/c++-faq-lite/const-correctness.html


It is a very nice source. Thanks for that
Mahmood NT



----- Original Message ----
From: Laurent Rineau
<>
To:

Sent: Friday, January 4, 2008 2:03:56 PM
Subject: Re: [cgal-discuss] can not call a function taht takes Alg_point_2

On Friday 04 January 2008 08:28:30 Mahmood NT wrote:
> Hi,
>
> >Alternatively, it might help, to write "const Alg_point_2& first",
> >but this is a wild guess looking at the error message.
>
> it was not a bad guess... but I add "const" at the end of decleration as:
>
> bool isShorter( Alg_point_2& first, Alg_point_2& second, Alg_point_2& goal
> ) const
>
> and the error actually gone! I do not know why, but the problem solved

You should use const a little more. All the variables of isShorter can be
const, in your code. Do you know the "C++ FAQ"? It is a nice source of
information. As for the uses of const, you can read that page:

http://www.parashift.com/c++-faq-lite/const-correctness.html

--
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)
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss



____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs



Archive powered by MHonArc 2.6.16.

Top of Page