0
What is difference between C++ & C# ?
2 Answers
+ 9
A list of differences between the two languages include:
Size of binaries: C# has a lot of overhead and libraries included before it will compile. C++ is much more lightweight. Therefore, C# binaries are much larger after it compiles compared to C++.
Performance: C++ is widely used when higher level languages are not efficient. C++ code is much faster than C# code, which makes it a better solution for applications where performance is important. For instance, your network analysis software might need some C++ code, but performance is probably not a huge issue for a standard word processing application coded in C#.
Garbage collection: With C#, you donât have to worry much about garbage collection. With C++, you have no automatic garbage collection and must allocate and deallocate memory for your objects.
Platform target: C# programs are usually targeted towards the Windows operating system, although Microsoft is working towards cross-platform support for C# programs. With C++, you can code for any platform including Mac, Windows and Linux.
Types of projects: C++ programmers generally focus on applications that work directly with hardware or that need better performance than other languages can offer. C++ programs include server-side applications, networking, gaming, and even device drivers for your PC. C# is generally used for web, mobile and desktop applications.
Compiler warnings: C++ will let you do almost anything provided the syntax is right. Itâs a flexible language, but you can cause some real damage to the operating system. C# is much more protected and gives you compiler errors and warnings without allowing you to make some serious errors that C++ will allow.
0
Thank u âș