[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Pointer to function problem
From: |
Pierre Barbier de Reuille |
Subject: |
Pointer to function problem |
Date: |
Sun, 23 Jul 2006 15:36:59 +0100 |
User-agent: |
Thunderbird 1.5.0.4 (X11/20060713) |
Hello,
I have a problem with g++ 4.1
I use pointer to functions and I get this error :
src/wrappers/export_vertex.cpp|122| error: no matches converting
function 'cross' to type 'real_t (*)(const class TOOLS::Vector2&, const
class TOOLS::Vector2&)'
/home/barbier/prog/labo/AMAPmod/src/Tools/util_vector.h|232| error:
candidates are: real_t TOOLS::cross(const TOOLS::Vector2&, const
TOOLS::Vector2&)
/home/barbier/prog/labo/AMAPmod/src/Tools/util_vector.h|510| error:
TOOLS::Vector3 TOOLS::cross(const TOOLS::Vector3&, const
TOOLS::Vector3&)
Here is the line with the error:
real_t ( *cv2cv2_cross )( TOOLS::Vector2 const&, TOOLS::Vector2 const& )
= TOOLS::cross;
I tried to use a typedef like that :
typedef real_t ( *r_cv2cv2 )( const Vector2&, const Vector2& );
r_cv2cv2 cv2cv2_cross = cross;
But the problem is exactly the same.
I really don't understand it ! Also, I tried to reproduce the error with
a simple program but I don't seem to be able to :(
Thank you,
Pierre
- Pointer to function problem,
Pierre Barbier de Reuille <=