473,767 Members | 2,226 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 : 'IServiceProvid er' : 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 /* */ IServiceProvide r *LPSERVICEPROVI DER

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 1718
> - 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
4379
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 files containing some templates: adjacency_list.hpp and mem_fn.hpp can not compile. Does anyone have any solutions?
0
334
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 COM. I'm attempting to develop an ATL wrapper to expose a COM interface to a .NET assembly (I don't want to have to sign the .NET assembly to expose directly).
3
2734
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... DotNetManagedExport.cpp C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\atlcom.h(5529) : error C2872: 'CONNECTDATA' : ambiguous symbol could be 'C:\Program Files\Microsoft Visual Studio .NET
5
2552
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 in a header file, I have written this line: using namespace System::Runtime::InteropServices; This line is necessary for key word. But when compiling the project, I get this error:
1
1768
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 8\VC\PlatformSDK\Include\ServProv.h(48) : System::IServiceProvider IServiceProvider' or 'stdafx.cpp : System::IServiceProvider'
1
6054
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 code all i do to get this is this #include "frmUsrPass.h" //this is managed code, no problem #include "client.cpp" // this is unmanaged code #include "\utils\utils.h" // this too
9
13278
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 <hash_map>//from Standard template library //and some other headers
4
4856
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 C2872-'Rectangle':ambiguous symbol. How can I resolve this ambiguity? Thanks, David
0
1576
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.
0
9571
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
9959
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8835
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7381
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6651
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5279
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3929
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3532
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2806
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.