I am using Visual C++ or visual C#, which should I use?
I am using Visual C++ or visual C#, which should I use?
What kinds of programs are you interested in writing?
Programming languages are tools (much like a hammer and saw are tools for a carpenter).
Picking the right tool(s) for the job at hand is vital.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
I wanna make a game, but I'm making a calculator to start.
C++ I would say is the way to go then.
Code - functions and small libraries I use
It’s 2014 and I still use printf() for debugging.
"Programs must be written for people to read, and only incidentally for machines to execute. " —Harold Abelson
Thanks, can anyone compare them?
This question should be in a more general forum.
C# runs in a virtual machine and mostly assumes prescence of a .NET framework. In practice it makes it easier to develop Windows applications, if that is your target.
C++ compiles to native code and makes minimum assumptions about the underlying system. There is no built in GUI or graphics support, so to get those features you generally choose the libraries you want and add them to your project. In practice it probably takes more effort to get productive in C++ but once this effort is exerted you have more possibilities than in C#.
thx!
Moved to General Discussions.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
Hmmm.... This is a tough question to answer. I think C# is quicker and easier if you want to keep your applications more Windows friendly. This isn't to say that Unix-like systems won't be able to benefit from your code but I'm not sure how easy it is to port C# code between platforms.
I've found something that might help though. Assuming you know C++ and C# well enough, this might help :
C# for C++ Developers
and
C++ vs. C vs. C# - C++ Forum
Edit : I'm someone that loooooves to focus on performance or optimizations so C++ is my favorite. Or at least, I try to focus on performance, ha ha.
Last edited by MutantJohn; 04-27-2014 at 10:43 AM.
Dude, you guys are nicer than what i expected, I think there might be flamewars (I am ready for it)
I'd tread carefully when reading those links.
The first is clearly written by someone (or someones) who knows C# a lot better than they know C++. Some of the things stated to be "common" in C++ are considered really bad practice in C++.
Although some posts in the second link are alright (people taking a balanced view in which C, C#, and C++ all have their place), most of the posters are writing to advocate one or other of the languages.
As a general rule, it is a mistake to reason about any one of these languages based on experience in another. The languages are too different for that sort of thing to work well. A C# developer who knows a little bit of C and C++ is rarely a useful source of information about C or C++. That sort of statement cuts each way too.
I've decided to go with C#, I can use it in Unity, I wanna learn unity, dude.
Bro, I'm so glad we helped you come to a solid conclusion, mang. Manger. Bro-tastic voyager, I wish you only the best of luck in your coding adventures!
Use C#, it's by far better.
C# is bound to the garden of Microsoft, where things are kept nice and ordely for everyone's benefit. But C++ is on any random platform, it's freedom is bad. Like it would be for weed.
C# uses a nice massive runtime, but C++'s runtime is pretty small and ubiquitous. So when your users don't see those dependencies they'll think it's not a very well supported program.
C# is dynamic, so when things take a long time to happen, your users will know it's getting stuff done. But C++ is natively compiled so when things happen fast, your users will think it's not getting any real work done.
C# is spontaneously garbage collected, so you can write code without caring about resources. In C++ you're encouraged to use predictable features like RAII, and when you have to consider everything your code is doing it hurts your productivity.
Last edited by Yarin; 04-29-2014 at 10:27 AM.
That's facetiousness, right? Because right now I'm laughing so hard XD