Thread View: borland.public.cppbuilder.upgrade
2 messages
2 total messages
Started by Roland
Thu, 04 Oct 2007 12:35
problems with vectors when migrate from BCB6 to BDS2006
Author: Roland
Date: Thu, 04 Oct 2007 12:35
Date: Thu, 04 Oct 2007 12:35
60 lines
2204 bytes
2204 bytes
I've problems when migrate from BCB6 to BDS2006. In BCB6 iterators of
vectors can handled over to functions
and can be converted to different types as shown below. With BDS2006
it semms to be impossible or more restricted.
Is there any solution for this problem?
class PACKAGE TObcStation : public TCsStation
{
public:
__fastcall TObcStation(const UCHAR StationNr, TCsProcessor* Processor);
....
}
//---------------------------------------------------------------------------
void __fastcall TCsSystem::SearchSomeWhat()
{
vector <TObcProcessor>::iterator obc_iter;
for(obc_iter = ObcProcessors.begin(); obc_iter < ObcProcessors.end();
obc_iter++) {
TObcStation Obc9600Station(ucStation, obc_iter); //here I get Error E2285
like: "no match found of..."
}
....
//---------------------------------------------------------------------------
void __fastcall TCsSystem::SearchSomeWhat()
{
vector <TObcProcessor>::iterator obc_iter;
for(obc_iter = ObcProcessors.begin(); obc_iter < ObcProcessors.end();
obc_iter++) {
TObcStation Obc9600Station(ucStation, (TCsProcessor*)obc_iter); //here I
get Error E2031, like: "type casting forbidden"
}
Roland
Re: problems with vectors when migrate from BCB6 to BDS2006
Author: David Dean [CodeGear]
Date: Thu, 04 Oct 2007 20:41
Date: Thu, 04 Oct 2007 20:41
17 lines
1605 bytes
1605 bytes
In article <op.tzoalmyvo3vsnd@station33.intern>, Roland <neubert_nosp@nosp_wst.eu> wrote: > I've problems when migrate from BCB6 to BDS2006. In BCB6 iterators of > vectors can handled over to functions > > and can be converted to different types as shown below. With BDS2006 > it semms to be impossible or more restricted. > > Is there any solution for this problem? I suggest you repost this in the .language.cpp group. -- -David Dean CodeGear C++ QA Engineer <http://blogs.codegear.com/ddean/>
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads