C++ or C#

Whats the difference Is one better then the other. It probably depends so say I want to make games, which I do, but Im a newb to C++ so thats a long ways from now. Ive been learning about C++ and taking tutorials, but should I be using C#


Answer this question

C++ or C#

  • ormistons

    You can use C# but i want to share my experience regarding language performance differences.

    Once i had to built a very complex application which contain a module to do actuarian calculations so i made benchmark to analyze language differences .I run those benchmarks for Visual C++,Borland C++,Java,VisualBasic,and C#

    According to the results i got Visual C++ as the best , c++ as 2nd ,C# as 3rd and java on 4th position.

    So i obviously selected VC++.

    But one thing you must keep in mind that c++ is truly object oriented while c# like java is not full object oriented as it doest'nt support multiple inheritence for types

    Thanks.



  • leonide

    multi inheritence is confusion by the way,

    that depends on what you want to do, actualy to write code in C++ will take long time but it will be faster

    C# will save lots of time for you but its slower

    so for games all recomend C++ , but for bussiness application they recomend C#

    hope this helps



  • Sanchet

    C# targets only the .NET framework. C++ also targets other platforms like Win32.

    If you want to develop using C# you will need to use .NET and probably managed DirectX to develop a game. It is not a bad choice and will get you where you want.

    C++ provides all the options of C# but also will let you use unmanaged directx and it might have a performance difference as it does not do what .NET does for you, that includes keeping track of unreferenced objects. In C++ that would be a memory leak but in .NET it is taken care of by the framework.

    For most development you are most productive in a managed language as C# but if you must have more control you should use an unmanaged language like C++.

    A cool thing is that Visual C++ lets you mix managed C++ with unmanaged code.



  • C++ or C#