+ 1
What are the main differences between c# and c++ ?
means like will it be better to opt for c# over c++...
1 ответ
+ 13
A list of differences between the two languages include:
Size of binaries: We mentioned that the two languages are compiled languages that turn your code into binary files. 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.
- Up Work
For me, choose C++