Hi guys,
i have recently stumbeled accross this array<String^>^args, what on earth is a String ^ ? i tried looking for documentation on this but found nothing
br
Printable View
Hi guys,
i have recently stumbeled accross this array<String^>^args, what on earth is a String ^ ? i tried looking for documentation on this but found nothing
br
This is C++/CLI or Managed C++, not standard C++, so I would look into THAT sort of documentation.
thats a microsoft VC.NET specific extension.
It means that it is a garbage collected pointer in the .NET framework.
It depends on whether it's Managed C++ or C++/CLI. The former is an extension, the later is not.
Eh, they're two different things.
The C++/CLI pointers are part of dotCrap, and therefore must adhere to its rules, such as garbage collection. That's just unavoidable. That avoid mixing managed and unmanaged types, they introduced new syntax. But boy, I do agree with you that it's ugly.
so how would i convert a ^String to a regular string?
The most likely solution is to NOT use C++/CLI. You probably don't need it. If you'd need it, you'd know. Start a new project and use Win32 Console or whatever you need.
i am afraid i can not avoid it, i am using FileWatch which forces me to use this, which is why i really need to find a way to convet a ^String into a string or char * type
br
Did you try Google? It's only one of the most frequently asked questions about C++/CLI.
Let me ask the next obvious question: if you need FileSystemWatcher from the .NET Framework, why are you using C++? Why not C#?
i am a C++ guy not a C# person ;)
Use the right tool for the job I say.
So if you are just using "C++" just cause you are a C++ guy, that is kind of a waste unless you are looking for a learning experience. Of course if this is for a job or school and are forced too, what can you do :)