error C2872 : 'IServ

B

bor_kev

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
 
T

Tamas Demjen

- 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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top