• C++ Dotnet namespaces
    9 replies, posted
So, I decided to program some c++. I know the basics of it BUT... I want .NET namespaces and functions. Like System.Net.Sockets, TcpClient and stuff like that. How can I do that? I use Microsoft Visual Studio 2005.
The problem is that .NET is for managed languages, as such you could use C++/CLI. What's wrong with C#? Or why are you focused on C++, but using .NET?
I program vb.net c#.net and c++. I find c++ more challenging then c#. And with c# i dont know how to use some functions like cout, cin fstream. I just thought it would be cool to use .net with c++. I want challenges when programming ;)
.NET's cout is System.Console.Writeln, .NET's cin is Sytem.Console.Read(Line) and .NET's fstream is System.IO.FileStream. To do networking with C++ you can use 3rd party libraries. The closest to .NET might be the Win API. I have used Boost though and found it pretty sleek.
I found this: [url]http://msdn.microsoft.com/en-us/library/system.net.sockets.tcpclient.aspx[/url] Where they use Classes and functions just like .NET. how :(
C++/cli
I searched... C++/CLI is standardized by Ecma as ECMA-372. It is currently available only in Visual Studio 2005, 2008 and 2010 (also included in the Express Editions). [url]http://en.wikipedia.org/wiki/C%2B%2B/CLI[/url] Please explain. (I'm not some kind of programming pro that understand everything).
It's a dialect of C++, which aims to make it a "managed c++". This makes it an own language, which happens to be similar to C++ but can be compiled to CIL.
So the best advice now would be: Get back to C# if you want .NET namespaces, right?
I'd say just take another library to do non-standard stuff like networking in C++. I don't understand what'd be wrong with that. If you want to use .NET in C++, then C++/CLI is the closest thing you'll get. It's another language, which is not C++ (and definitively not C# or anything else), but very similar. I think it acts like a superset, but I can't speak from experience. And in the end, if you just really want .NET for some reason and dislike C++/CLI, yeah C# is the way to go.
Sorry, you need to Log In to post a reply to this thread.