473,385 Members | 1,934 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

error C2872 : 'IServ

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
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Nov 17 '05 #1
1 1693
> - 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
Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: AIM | last post by:
Error in msvc in building inheritance.obj to build hello.pyd Hello, I am trying to build the boost 1.31.0 sample extension hello.cpp. I can not compile the file inheritance.cpp because the two...
0
by: nmyatt | last post by:
Hi, The project I'm working on consists mainly of legacy VC6 C++ and VB, but we wish to write all new code in C#. So I'm looking at ways for exposing .NET functionality to VB and C++ through...
3
by: Lee Gillie | last post by:
I have a VS6 project which I brought into VS .NET, and all has been building fine. Then I upgraded to VS 2003 and I have one source which will no longer compile. Any clues? Compiling......
5
by: rodri rodri via DotNetMonster.com | last post by:
I have done a program with windows forms in "Visual C++". I have implemented a function that returns two values. For example: double functionExample(int parameter, double __gc* result2); And...
1
by: Simon Jefferies | last post by:
Hello, I'm writing a managed c++ project and have the following error:- error C2872: 'IServiceProvider' : ambiguous symbol could be 'c:\Program Files\Microsoft Visual Studio...
1
by: Rick | last post by:
Error 2 error C2872: 'IDataObject' : ambiguous symbol C:\Archivos de programa\Microsoft Visual Studio 8\VC\PlatformSDK\include\objidl.h 7408 this is the error i got by mix managed and unmanaged...
9
by: Prasad | last post by:
HI, I am a beginner in VC++.. I am trying to write a Win32 console application in visual studio.. I am using following header files.. #include <STRING> using namespace std; #include...
4
by: davidk13 | last post by:
My C++/CLI program uses the WinAPI to create a document, and my use of the Rectangle function--BOOL Rectangle (HDC hDC, int nLeft, int nTOP, int nRight, int nBottom--results in a compiler error...
0
by: aWiproUser | last post by:
I am upgrading my project from VC 6 to VC++.NET i am getting c2872 error. Could help me regarding this.
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.