what is the difference between c# & c++ ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

what is the difference between c# & c++ ?

12th Jun 2016, 1:09 PM
Deyaa El_deen Hazem Sabry
Deyaa El_deen Hazem Sabry - avatar
5 Answers
+ 3
C# applications, require .Net to run. .NET framework assures that your code will have the same outcome on any Windows device that has the framework. C++ has no such requirements, but you have to use the Windows API yourself. With C++ you have to create the application window, messages loop... every little single thing. .Net has all those things in a shell and you don't care how it's done, if your application runs on 64bit architecture or 32bit, etc.
12th Jun 2016, 3:01 PM
Andrei Timofte
Andrei Timofte - avatar
0
C is the mother language of Java and CPP and Java scr it CPP is special part of C and has its own details
12th Jun 2016, 2:12 PM
Omar Essam
Omar Essam - avatar
0
C# is more advanced but yet simplified therefore easier to more with and more efficient than C++
14th Jun 2016, 4:14 PM
Samuel Diarra
Samuel Diarra - avatar
0
C++ was designed to allow developers to use all of the existing features of C but provides a number of extensions to support object-oriented programming techniques in an intermediate-level programming language. C# is a complete outlier in this list. Despite it's name, it has far more in common with Java than C or C++.There are following differences or similarities between C++ and C# are given below: C++ developed by Bjarne Stroustrup and C# developed by Anders Hejlsberg. C++ is not pure object orient language, while C# is a pure object oriented language. C++ does not support delegates, while C# uses delegates - type-safe method pointers. These are used to implement event-handling. In an important change from C++, C# code does not require header files. All code is written inline. C# has some feature derived from Visual Basic and Java but C++ is C#'s closest relative. We can use pointers in C#, that code is known as unsafe code, but they are only really useful in situations where performance gains are at an absolute premium. C# pointers are less powerful than C++. Because .NET runtime in which C# runs performs memory management takes care of tasks like garbage collection. All C# data types are ultimately derived from the object type. One important difference between C++ and C++ is, C# supports bound checking of arrays. But C++ does support bound checking of arrays. C# supports garbage collection of memory space while C++ does not support garbage collection. C# exception handling is more power compare to C++ exception handling. Generic programming is also more powerfully used in C# compare to C++. Concept of class properties used in C#. It does not supported by C++. C# statements are quite similar to C++ statements. To note just one example of a difference: the 'switch' statements have been changed so that 'fall-through' behavior is disallowed. C# gives up on the idea of multiple class inheritance. Other differences relating to the use of classes are: there is support for c https://www.javatpoint.c
8th Aug 2018, 2:26 AM
deepak sharma
deepak sharma - avatar
- 2
C# is more targeted for game development than cpp is
14th Jun 2016, 9:07 PM
Charliys Que
Charliys Que - avatar