Bonjour,

je convertis une bibliothèque conçue pour VC6 vers VC2005 :
ce bout de code passait sous VC6 mais est refusé par VC2005 :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
 
void CPGLLine2DLOD::PlotLineStripGfx(gfxinterface::CGfxInterface& gfx)
{
	const LODLine::KeyContainer& kc= m_hull.GetKeys();
	LODLine::KeyContainer::const_iterator it;
	UINT i;
	double* pX=new double[kc.size()];
	double* pY=new double[kc.size()];
	for (it=kc.begin(), i=0; it!=kc.end();it++, i++)
	{
             // ligne (174) en erreur
		pX[i] = (*it)->x;
             // idem
		pY[i] = (*it)->y;
	}
 
}
voilà les définitions préalables sont:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
 
 
typedef hull::TDPHull<double> LODLine;
 
namespace hull
{
 
//! points container
typedef typename std::vector<SPoint> PointContainer;
//! Key containers
typedef typename std::list<std::vector<SPoint>> KeyContainer;
 
}
J'obtiens les erreurs suivantes :

c:\program files\microsoft visual studio 2005\vc\pgl\pglline2dlod.cpp(174) : error C2819: type 'std::vector<_Ty>' does not have an overloaded member 'operator ->'
with
[
_Ty=hull::TLineApproximator<double>::SPoint
]
did you intend to use '.' instead?
c:\program files\microsoft visual studio 2005\vc\pgl\pglline2dlod.cpp(174) : error C2039: 'x' : is not a member of 'std::vector<_Ty>'
with
[
_Ty=hull::TLineApproximator<double>::SPoint
]
(Dites-moi s'il vous manque des données sur les définitions)

Comment corriger ça ?
Merci d'avance
Philippe