Subject: CGAL users discussion list
List archive
- From: Laurent Rineau <>
- To:
- Subject: Re: [cgal-discuss] can not call a function taht takes Alg_point_2
- Date: Fri, 4 Jan 2008 11:33:56 +0100
- Organization: Inria, Sophia Antipolis, FRANCE
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)
- Re: [cgal-discuss] can not call a function taht takes Alg_point_2, Mahmood NT, 01/04/2008
- Re: [cgal-discuss] can not call a function taht takes Alg_point_2, Laurent Rineau, 01/04/2008
- <Possible follow-up(s)>
- Re: [cgal-discuss] can not call a function taht takes Alg_point_2, Mahmood NT, 01/04/2008
Archive powered by MHonArc 2.6.16.