Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / February 2005

Tip: Looking for answers? Try searching our database.

error C2872 : 'IServ

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
bor_kev - 18 Feb 2005 07:54 GMT
Hi,

i am developing under Microsoft Visual Studio 2005 (C++). I am using
managed classes ( ref class Myclass) and STL.NET but i am facing two
main problems :

- As u know, now pointers are replaced by a new syntax( before :
String * ptr ; now : String ^ ptr) that i'm using now. However, when
i compile i got this error message :

error C2872 : 'IServiceProvider' : ambiguous symbol.

This mistakes is in the ServProv.h file that i didn't implement (it
may be generated automatically). In this file ,the error is in this
line syntax :

typedef /*  */ IServiceProvider   *LPSERVICEPROVIDER

i tried to replace the * sign by the ^ sign but i still get this error
message.

- Another thing is the vector syntax problem : i read that the new
vector syntax is for instance : vector <String ^> ^ label to
declare a string vector. I also included the header file vector and
algorithm (#include <vector>and #include <algorithm> )
but when i compile the compiler says there's a missing ";" in the
following line :

vector <String ^> ^ label  = gcnew vector <String ^> ;

what i don't understand.

I thank u in advance.

Sincerely

bor_kev
Tamas Demjen - 28 Feb 2005 17:32 GMT
> - Another thing is the vector syntax problem : i read that the new
> vector syntax is for instance : vector <String ^> ^ label to
> declare a string vector.

STL.NET is not in Beta 1 yet. You have to wait about one more month, and
let's hope it will be added to Beta 2.

Also note that even if it will be implemented, you don't #include
<vector>, because that's STL, and it's native C++, it doesn't support
managed types like String^. You'll have to include <cli/vector> or
something like that.

Tom

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.