+ 7

C++ Vs C#

I intend to learn one of either C++ and C#. I am having difficulty deciding which to take up. Which would you recommend, why?

14th Jul 2017, 6:27 PM
Cornel
Cornel - avatar
17 ответов
+ 4
If you're wanting to make games with CryEngine or Unreal Engine, I recommend C++ because as far as I know, they don't accept C#. Unity however, does, but it's not C#, it's a form of C# called "UnityScript" If you are wanting to work with .NET Framework, then I recommend C# because it is known for that. .NET Framework, acccording to Lifehacker.com: "a framework is just a bunch of code that the programmer can call without having to write it explicitly " When I started programming, I started learning a little bit of C++ using CodeBlocks, and It was simple compared to C#, so if you are new to scripting as a whole, I recommend C++ because it is more simple.
14th Jul 2017, 6:39 PM
Dillion Piazza
Dillion  Piazza - avatar
+ 4
C# support in Linux is so weak although there's some work, so of course you need c++. I suggest you to learn c++, and then a framework to make gui or console apps, like Qt. This adds powerful features to your weapon ;-)
14th Jul 2017, 7:10 PM
Ali Rashidi
Ali Rashidi - avatar
+ 3
The difficulty is the same for both, but I think the path to learning c++ introduces you with more aspects of programming than c#, although they both fully support features like OOP etc. The other big important point is the platform, the OS if you're developing an app, or the game engine for game development. The language you start with is most of the time the one you master so it's important that you learn the correct one at first and save your time. Life's too short to learn 2 different languages for one purpose.
14th Jul 2017, 6:58 PM
Ali Rashidi
Ali Rashidi - avatar
+ 2
So far I hear C++ over C# for gaming and the reverse for .NET frameworks. I intend to build Linux based utility software.
14th Jul 2017, 7:08 PM
Cornel
Cornel - avatar
+ 2
what about their learning curve?
14th Jul 2017, 7:14 PM
Cornel
Cornel - avatar
+ 2
Not much different, the more you do projects, the more you learn and these languages have many techniques to learn. So there's always something new.
14th Jul 2017, 7:23 PM
Ali Rashidi
Ali Rashidi - avatar
+ 2
thanks friend. I'll start off with C++. If I have any concerns on the comparison, I'll raise.
14th Jul 2017, 7:26 PM
Cornel
Cornel - avatar
+ 2
C/C++ and C# are essential the same language. they use the same syntax. the differences are that c# is a managed language that has built in protection and cross platform capabilities. in C# compared to C++ things like memory allocation and garbage collection are done by the common runtime. in C++ you're on your own. C# is a subset of the C++ language created by Microsoft and as such will have little to no support on Unix based systems. generally speaking if you learn C++ it only takes a few modifications in your coding practices to move to C#
15th Jul 2017, 7:09 AM
Chris Cook
Chris Cook - avatar
+ 1
Ehm, I started learning C++, But I only know cin and cout in C++, I specialize in JS which was my third scripting language I've learned. Two Languages For One Purpose is common, because of HTML & JS both factor in with each other. In addition, CSS and HTML? So learning two different languages for one purpose is common.
14th Jul 2017, 7:02 PM
Dillion Piazza
Dillion  Piazza - avatar
+ 1
@TotallyNotDillion The subject is different now, in your field you learn two languages to complete each other, even in app development, I sometimes use C++ and QML, JS together. But what I mean is two languages who can do the same job without needing each other, have you ever heard that someone mixes c++ with c#. I think I had to be more clear and say "two different languages *with* one goal", I mean two different languages who do the same.
14th Jul 2017, 7:08 PM
Ali Rashidi
Ali Rashidi - avatar
+ 1
@Ali Rashidi Ah okay, that makes since, I took it as you were saying like "If you use HTML you don't have to use JS" so I misunderstood you and I apologize!
14th Jul 2017, 7:10 PM
Dillion Piazza
Dillion  Piazza - avatar
+ 1
@TOTALLYnotDILLION Oh I should apologize for not being clear enough. Anyways, now it's clear what we meant.
14th Jul 2017, 7:12 PM
Ali Rashidi
Ali Rashidi - avatar
0
Thanks for making my answer "the best" :D
14th Jul 2017, 7:34 PM
Dillion Piazza
Dillion  Piazza - avatar
0
would it be a bad idea to know both of them. Or would it be confusing
15th Jul 2017, 5:07 AM
Jorge Gomez
Jorge Gomez - avatar
0
can I ask a question it is kind of stupid but here it goes why is the c++ in solo learn is different from turbo c++ in windows not even a single thing matches it eg: #include <iostream> gives error why is that
15th Jul 2017, 7:27 PM
Nikhil Robinson
Nikhil Robinson - avatar
0
@Nikhil my guess is because it's already included beforehand. Please ask questions as a new thread though so more people can see it.
15th Jul 2017, 7:29 PM
Dillion Piazza
Dillion  Piazza - avatar
0
without knowing the error that's being generated it's hard to say. and each implementation of the language might be slightly different even though it follows the c language standard
15th Jul 2017, 7:33 PM
Chris Cook
Chris Cook - avatar