Article View: borland.public.cppbuilder.migration
Article #111BCB6 project to CB2007 problem.
From: Gene
Date: Thu, 26 Jun 2008 07:27
Date: Thu, 26 Jun 2008 07:27
18 lines
1389 bytes
1389 bytes
Hi,
I have got a compiling error saying "[BCC32 Error] switch1.cpp(40): E2034 Cannot convert 'std::_Vector_iterator<std::string,std::allocator<std::string> >' to 'std::string *'"
The code is as in below:
std::vector<std::string> StringList;
for (int i = 0; i < 10; i++) {
StringList.push_back(IntToStr(i).c_str());
}
std::vector<std::string>::iterator it=StringList.begin();
std::string* ctmp=it;
ShowMessage(ctmp->c_str());
It compiles ok in BCB6, but it is an error in C++ Builder 2007. Is it any compilation options I set wrong? Or C++ Builder 2007 is a lot stricter in grammar than BCB6? Can anyone give me help on this?
Thanks.
Gene.
Technical Details
Message-ID:
<486344ca@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!feeder.news-service.com!news.isoc.lu!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 110f51,707ee0890811ca3,start X-Google-Attributes: gid110f51,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "Gene" <shenjige@yahoo.ca> Sender: "Gene" <shenjige@yahoo.ca> Reply-To: "Gene" <shenjige@yahoo.ca> Subject: BCB6 project to CB2007 problem. Newsgroups: borland.public.cppbuilder.migration X-User-Info: 116.25.136.110 NNTP-Posting-Host: 207.105.83.66 Message-ID: <486344ca@newsgroups.borland.com> Date: 26 Jun 2008 00:27:06 -0700 X-Trace: newsgroups.borland.com 1214465226 207.105.83.66 (26 Jun 2008 00:27:06 -0700) Lines: 19 Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!feeder.news-service.com!news.isoc.lu!newsgroups.borland.com!not-for-mail