Error C3699
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn error c3699 '^' cannot use this indirection on type more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags error 3699 Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you,
Error C2440
helping each other. Join them; it only takes a minute: Sign up error C3699: '^' : cannot use this indirection on type 'std::string' up vote 1 down vote favorite I am trying to access lync from my
Error C2728
application in this code I am getting errors. error C3699: '^' : cannot use this indirection on type 'std::string' error C2440: 'initializing' : cannot convert from 'System::String ^' to 'std::string *' 1> No user-defined-conversion operator available, or 1> Cannot convert a managed type to an unmanaged type My code is as follows: #using #using //namespace provided that DLL using namespace Microsoft::Lync::Model; //Function which is using that DLL void getusername() { LyncClient ^lyncClient; string ^text=lyncClient->Self->Contact->GetContactInformation(ContactInformationType::DisplayName)->ToString(); error c3149 } visual-c++ c++-cli share|improve this question edited Jun 27 '14 at 22:20 Benjamin 11.4k1692171 asked May 15 '14 at 15:27 user3641477 86 2 Somewhere you have a using namespace std; Stop that at once and never do it again. It things you are declaring text as a std::string and not a System::String. This resolves both errors. –crashmstr May 15 '14 at 15:42 Also, make sure you tag C++-CLI, because that is the correct "language" tag –crashmstr May 15 '14 at 15:42 add a comment| 1 Answer 1 active oldest votes up vote 3 down vote accepted ToString() is returning a managed System::String type. This is different from the unmanaged std::string type. To convert from one to the other, use marshal_as. share|improve this answer answered May 15 '14 at 15:36 Joel Rondeau 5,98323043 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer you're looking for? Browse other questions tagged visual-c++ c++-cli or ask your own question. asked 2 years ago viewed 2151 times active 2 years ago Related 2C++/CLI Converting System::String to const char*1Improvi
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta
Error C2976 Std Array Too Few Template Arguments
Discuss the workings and policies of this site About Us Learn more * cannot use this indirection on type about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack cannot use this indirection on type 'system::string ^' Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping http://stackoverflow.com/questions/23682589/error-c3699-cannot-use-this-indirection-on-type-stdstring each other. Join them; it only takes a minute: Sign up Managed and unmanaged code error C3699 up vote 0 down vote favorite I am working on a game which uses C# and C++. Classes for models are written in C# and levels structure is stored in XML files. When I want read it in C++ and http://stackoverflow.com/questions/15314126/managed-and-unmanaged-code-error-c3699 want to build project I have this strange error and I don't where to find some bugs. Error 1 error C3699: '*' : cannot use this indirection on type 'Cadet::XMLReader::Models::Obstacle' C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xmemory0 527 1 Cadet.Game These kind of errors are in xmemory0 and list files? what they are? and it happend only for Obstacle class, the rest are fine. Here it is part of the code void SetupObstacles(std::list &obstacles) { int size = CurrentLevel->Obstacles->Length; Cadet::XMLReader::Models::Obstacle^ currentObstacle; } c# c++ unmanaged managed share|improve this question edited Mar 9 '13 at 18:44 nsconnector 638411 asked Mar 9 '13 at 18:08 Tomasz Kowalczyk 613518 2 Show your code.. –Soner Gönül Mar 9 '13 at 18:09 which part because these errors shows in xmemory0 and list files not in some of files of the project –Tomasz Kowalczyk Mar 9 '13 at 18:11 try building by commenting xmemory0 so that we could know the source of the problem –nsconnector Mar 9 '13 at 18:14 @nsconnec
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company http://stackoverflow.com/questions/29490662/error-of-cannot-use-this-indirection-on-type-with-vector Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up error of “cannot use this indirection on type” with vector [closed] up vote -1 down vote favorite I'm simply trying to declare cannot use a vector: std::vector itemsVector; I have used #include , but it works only for primitive types and does not work for ListViewItem. getting the error: cannot use this indirection on type .net visual-c++ c++-cli share|improve this question edited Aug 7 '15 at 23:26 Deduplicator 27.9k63265 asked Apr 7 '15 at 11:37 beginsheinyani 229 closed as off-topic by CoryKramer, harper, m0nhawk, 一二三, nrussell Apr 7 '15 at 14:25 This question appears to be off-topic. The cannot use this users who voted to close gave this specific reason:"This question was caused by a problem that can no longer be reproduced or a simple typographical error. While similar questions may be on-topic here, this one was resolved in a manner unlikely to help future readers. This can often be avoided by identifying and closely inspecting the shortest program necessary to reproduce the problem before posting." – CoryKramer, harper, m0nhawk, 一二三, nrussellIf this question can be reworded to fit the rules in the help center, please edit the question. 4 try change it to std::vector. –varnie Apr 7 '15 at 11:38 @varnie works for type int for instance , but not for ListViewItem , any idea why? tried also std::vector itemsVector; but no good –beginsheinyani Apr 7 '15 at 11:45 Please ask in the question. –harper Apr 7 '15 at 11:50 In C++ pointers have asterisks so it's better to use them instead of caret. stackoverflow.com/questions/8701282/c-caret-vs-pointer –teivaz Apr 7 '15 at 11:53 3 That ain't no C++ but C++/CLI. –harper Apr 7 '15 at 12:10 | show 1 more comment 1 Answer 1 active oldest votes up vote 2 down vote If you are using C++/CLI, then you should generally use .Net containers to contain .Net objects. When writing C++/CLI, I generally only use