473,883 Members | 1,682 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

error C2872 : 'IServ


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
- 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.


Posted Via Usenet.com Premium Usenet Newsgroup Services
Nov 17 '05 #1
1 1721
> - 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.

Nov 17 '05 #2

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

Similar topics

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?
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).
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
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:
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'
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
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
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
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.
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...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
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...
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...
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...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
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.