Re: VC6 -> VC2005 conversion problem
- From: David Wilkinson <no-reply@xxxxxxxxxxxx>
- Date: Fri, 11 Jan 2008 05:40:57 -0500
Philippe wrote:
Hello,<snip>
I'm converting my project from VC++6 to VC++2005.
among many compilation errors now solved, that one is stucking me :
I have that template :
the faulty code is :
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++)
{
// line (174) in error
pX[i] = (*it)->x;
// idem
pY[i] = (*it)->y;
}
}
I get that compilation error :
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
]
Strange, it compiled perfectly under VC6 and it's now faulty under VC2005
What norm change is responsible with that error and how to correct it ?
Philippe:
Well, it looks wrong to me. Don't you mean
pX[i] = it->x;
pY[i] = it->y;
Are you sure this compiled and worked in VC6?
--
David Wilkinson
Visual C++ MVP
.
- Follow-Ups:
- Re: VC6 -> VC2005 conversion problem
- From: Philippe
- Re: VC6 -> VC2005 conversion problem
- From: Philippe
- Re: VC6 -> VC2005 conversion problem
- References:
- VC6 -> VC2005 conversion problem
- From: Philippe
- VC6 -> VC2005 conversion problem
- Prev by Date: Re: Common Controls and UNICODE support problem
- Next by Date: Re: CDialog::OnCopyData, what does it do?
- Previous by thread: VC6 -> VC2005 conversion problem
- Next by thread: Re: VC6 -> VC2005 conversion problem
- Index(es):
Relevant Pages
|
|