0

What is better: C++ or C#?

please explain, why do u think so

13th Aug 2018, 9:33 PM
peter
peter - avatar
2 Respostas
+ 2
People don't understand that C++, while very similar, is a different thing from C. It is just backwards compatible and uses the same syntax. You can run all of your C programs in C++. It is much easier to learn C first then C++ or C#. C++ has a very steep learning curve. As for your question, no language is objectively better than another. A Toyota Camry isn't better than a Ford f250 and an f250 isn't better than the Camry. They just have different uses. C++ is faster and gives more control than C#, but it's more difficult. It really matters what you want to do.
14th Aug 2018, 1:16 AM
Dominic Nicholas
Dominic Nicholas - avatar
+ 2
No, not all that was written on C will be compiled by C++ compilers. There is no _Bool (for compatibility you can use bool macros from stdbool.h ) type in C++, no built-in complex types (_Complex double, _Complex float and _Complex long double, you can write _Complex double z = 2.4 + 3.5I), no variable-length arrays, no compound literals ((double[]) {1.0, 2.0, 3.0};). Also you need to perform typecast to correct type when allocated memory by malloc() in C++. And this is not all
14th Aug 2018, 1:59 AM
Roman Khristoforov
Roman Khristoforov - avatar