🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.upgrade
Article #45

BCB6 to BDS2006 problems with vectors

#45
From: Roland Neubert
Date: Wed, 26 Sep 2007 09:03
53 lines
2175 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
Technical Details
Message-ID: <46fa206a@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10529a,d8da502a83e62422,start
X-Google-Attributes: gid10529a,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
Reply-To: "Roland Neubert" <neubert_at_wst.eu>
From: "Roland Neubert" <neubert_at_wst.eu>
Newsgroups: borland.public.cppbuilder.upgrade
Subject: BCB6 to BDS2006 problems with vectors
Date: Wed, 26 Sep 2007 11:03:24 +0200
Lines: 55
Organization: WST
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138
NNTP-Posting-Host: 84.135.34.79
Message-ID: <46fa206a@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1190797418 84.135.34.79 (26 Sep 2007 02:03:38 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail