Click here to Skip to main content
15,903,362 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
what should be rigth choice from c++ and c#
Posted
Comments
Sergey Chepurin 29-Jul-12 13:42pm    
You can do everything on every platform in C/C++, but some things are much easier to implement using C# on Windows. C++ is a difficult language to learn and practice.
Joan M 29-Jul-12 14:36pm    
Each tool for each requirement...

It all depend on what you want to do with it.

That is not a question we can answer - they are not necessarily used for the same thing.

C# requires the .NET framework (or Mono), it cannot stand alone.

C++ can use the .NET framework, but it doesn't have to.

Both are powerful, both are flexible. It really depends on what you are planning on doing with it. If you are developing WinForms apps, or WPF apps, then I would go for C#.
If you are writing games, then C++.
If you are embedding software in a device, then neither - I'd probably use C instead most of the time.
 
Share this answer
 
C++ is best for developing software libraries.
So if that is what you want to do, use C++.
 
Share this answer
 
It depend on what you want to develop. The more closer you need to go to the hardware level, the more sense it makes to use unmanaged c++. If you want to develop higher level functionality, you probably will be happier with C#. But these are both only languages, the libraries you need to use, and the end product you need to deliver will decide what is the best for that project. If you are a beginner and want to decide witch of them to learn, I suggest you begin with C#. It is much easier to learn.
 
Share this answer
 
C++ gives you core functionality and custom resource management.
C++ will help you in understand what happens under the hood.
I would suggest learning both, C++ then C#, after that you will be able to easily learn any other language in a matter of days, and probably be able to structure your work well. C++ is harder to learn, require much more dedication and thought, but it's super powerful.
The C++ has better performance. The C++ language is still the performance king and the standard on Windows platforms, and I maintain a performance-critical project for WinCE, on which .NET performs poorly.

The C# language is somewhat easier, mainly because it conforms to OOP. C++ is generally more powerful because you can customarily manage resources. C# does it for you (though .NET Framework is far from perfect) which is also its main downfall. The C++ language is the core of programming, while C# is the MS simplified programming language. There are ready made classes available in .Net framework for Microsoft's C# which makes programming easier. While in C++, you have to do everything on your own. The C# is more cleaner and more unified. C++ has to content with being backward compatible with a great deal of C and earlier C++ versions, which means it can be quite messy. The C# language is very much seen as a Microsoft language and is really only available on Microsoft platforms (though of course, MCS runs on Linux with the Mono runtime).


In brief: There is no "better". If one of them would be better in everything, the other one would simply not exist ;) Thus you can not objectively say C++/C# is better.
It depends on what you're trying to do (try to use the language which suits best for your project). For example, C# is good for business application but C++ is good for scientific, engineer applications
C# is simpler, but not as fast or efficient as good C++ code.
If you tell me you will use C# to write a compiler, a OS, or even AutoCad or Photoshop, I'm going to laugh so hard.
I think If you already have C++ down pat then you should be able to learn just about any language.

I develop in both C++ and C# and both are good languages and have their own merits.
 
Share this answer
 
.Net (c#) and java comes with huge standard libraries that helps you with many common tasks.

While the C++ standard libraries lacks many of the features included with .Net and java - there are no shortage of alternatives like QT[^], and many C++ developers relies on boost[^] for their day to day development tasks.

Here is a list of some of my favourite C++ libraries:

  • ICU[^] - provides Unicode and Globalization support
  • Boost C++ libraries[^] - usable across a broad spectrum of applications, it's actually a huge set of libraries.
  • Xerces-C++[^] - a validating XML parser.
  • ACE[^] - an open-source object-oriented framework that implements many core patterns for concurrent communication software.
  • TAO[^] - a real-time CORBA ORB that is often used to develop mission-critical distributed real-time and embedded systems with hard and soft QoS requirements.
  • ØMQ[^] - Very useful for implementing distributed software when you do not care about interoperability.


You'll find high quality open source C++ libraries covering almost anything you may wish for.

Best regards
Espen Harlinn
 
Share this answer
 
C++ is more complex than C#.
So if you want to learn a new programming language, learning C# is easier than C++.
 
Share this answer
 
C++ is not a good language for starting up with programming. But if you don't start with C++, is most likely you will never use it. It is a paradox. But you have really to love C/C++ to work with it. So, be ready for slower starting, mind boiling bugs and crazy errors.
 
Share this answer
 
search this matter in MSDN. you'll see interesting text!
 
Share this answer
 
Comments
[no name] 5-Sep-12 11:44am    
you want know?
read it exactly :
http://msdn.microsoft.com/en-us/library/c6cyy67b.aspx

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900