Error 1 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 error c2976: 'std::array': too few template arguments About Us Learn more about Stack Overflow the company Business Learn more about && cannot use this indirection on type hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join cannot use this indirection on type system string 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 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 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
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 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 pass objects from C# to C++ getting “cannot use this indirection”? up vote 1 down vote favorite I have this function in C++: struct MyObject { } http://stackoverflow.com/questions/15314126/managed-and-unmanaged-code-error-c3699 testAlgorithm(array
previous topic :: View next topic Author Message DaHandyNewbie cheaterReputation: 0Joined: 03 Nov 2007Posts: 18 Posted: Wed Dec 01, 2010 8:18 am Post subject: Visual C++ char array http://forum.cheatengine.org/viewtopic.php?t=526586 to system::string? Hi! I have just begun to use Visual Studio 2008 to create a keygen. However, I can't set textbox text because my variable is a char*. I have no idea how http://www.cplusplus.com/forum/windows/89711/ to convert a char* to system::string. I have tried this: Code: int point1; char* value1[5]; SIZE_T stBytes1 = 0; //The code that gets window handle is here, stores it correctly to var phandle. cannot use ReadProcessMemory(phandle, (LPVOID)0x005F2D2C, &point1, 4, &stBytes1); ReadProcessMemory(phandle, (LPVOID)point1, &value1, 7, &stBytes1); char* value1_p = (char*)value1; String^ StrVal1 = String^(value1_p); this->textBox1->Text = StrVal1; The compiler tells me this: Code: Error 1 error C2275: 'System::String' : illegal use of this type as an expression So what does that actually mean? What's wrong? Thanks in advance! EDIT: I also tried this: Code: String^ StrVal1; StrVal1 = value1_p->toString(); Without success though. It cannot use this gives me this error: Code: Error 1 error C2039: 'toString' : is not a member of 'System::SByte' Back to top atom0sModeratorReputation: 126Joined: 25 Jan 2006Posts: 6753Location: 127.0.0.1 Posted: Wed Dec 01, 2010 9:10 am Post subject: From Google: http://stackoverflow.com/questions/56561/what-is-the-best-way-to-convert-between-char-and-systemstring-in-c-cli Another suggestion: Code: char*p="test string..."; System::String *str(p); I don't use VC++ so I can't guarantee any of these will work. Also with your reading code, is the string(s) you are reading pointers or is it just a direct 7char string? If you are reading a 7char string your definition to value1 is incorrect. And you also didn't give enough space to read 7 bytes either. Actually surprised to see someone using VC++ lol. _________________- Retired. Back to top DaHandyNewbie cheaterReputation: 0Joined: 03 Nov 2007Posts: 18 Posted: Wed Dec 01, 2010 9:30 am Post subject: Thanks for the reply! Your code gives me 2 errors: Code: Error 1 error C3699: '*' : cannot use this indirection on type 'System::String' Error 2 error C2440: 'initializing' : cannot convert from 'char *' to 'System::String ^' So it's still not working.. :/ Back to top hcavolsdsadgadsgI'm a spammerReputation: 26Joined: 11 Jun 2007Posts: 5810 Posted: Wed Dec 01, 2010 12:08 pm Post subject
an answer to this issue yet. Basically, I'm working with a simple Windows Form project in Visual Studio (with the usual setup files like Form1.h, stdafx.h and so on). I named the project App1, and it is simply supposed to create a window with a button and some numeric fields; I enter numbers into the fields, click the button and an answer comes out. This answer is calculated using a formula inside a class I wrote, (named Trinomial.h for possible future reference, it calculates option prices using a trinomial tree) so I am trying to include this class in the project as well. Now, the issue is that I need to use the std namespace in FMC.h, which I solve using the 'using namespace std' in the beginning, however the compiler complains with the following: 1>------ Build started: Project: App1, Configuration: Debug Win32 ------ 1> App1.cpp 1>App1.cpp(9): error C2976: 'std::tr1::array' : too few template arguments 1> c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\array(18) : see declaration of 'std::tr1::array' 1>App1.cpp(9): error C3699: '^' : cannot use this indirection on type 'std::tr1::array' 1> compiler replacing '^' with '*' to continue parsing 1>App1.cpp(9): error C2664: 'main' : cannot convert parameter 1 from 'int' to 'std::tr1::array *' 1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== I know this has to do with the std namespace inclusion because when I comment it out the error disappears (but the class doesn't work as a result). I am wondering whether someone here is familiar with the reason this happens. I can include the code as well if anyone wants, but it isn't anything beyond the standard windows form setup and this one extra class I'm trying to include. Thank you. Jan 8, 2013 at 10:37pm UTC Ogoyant (161) It might be helpful to include the code as well. You seem to not be using std::tr1::array as it is defined. You don't have to set your working namespace to std like using namespace std; to create the array, you can create it by referring to the namespace explicitly upon the array's creation like: std::tr1::array<int, 3> myArray; Also, I haven't used std::tr1::array, but I note that the array template is defined in the std::tr1 namespace, not simply in the std namespace. Last edited on Jan 8, 2013 at 10:39pm UTC Jan 9, 2013 at 2:28am UTC KalmanFilteredCoffee (6) You're right, I could just append std:: everywhere, but I think the code looks ugly