C# vs C++ I need to know!

Started by
44 comments, last by Kylotan 18 years, 10 months ago
I really need to know. I just got started with C++ so I am not that far. I need to know if I would be better off mastering C#. I know some of you may say the C# will never take off and C++ is the industry standard. Well for those of you who say that. I am not in the industry and by the time I am I dunno what to expect. Would it be better to just learn C#? I have heard alot of good things about it and how the development time is cut greatly and how you do not have to focus on memory management. I thought I had a good thought of just learning C++ but I am getting discouraged and I really need some more opinions.
------Signature------Inspiring young coder/programmer!
Advertisement
go c++ way. you'd just be wasting time with C#.
Quote:Original post by Anonymous Poster
go c++ way. you'd just be wasting time with C#.


I'm sorry but that is'nt enough to convince me. I need reasons why I should stick with C++.
------Signature------Inspiring young coder/programmer!
C++ is a pretty bad first language. If I had to pick between C++ and C# to learn as a first language, I'd definately go with C#.
i would recommend starting with c++. Generally what I have found is that people who start with C# or anything higher level than c++ have a very hard time going back and learning c++. Learning c++ first and sticking to it will probably benefit you much more overall.

as for the whole 'here to stay' question you had, its only going to be answered in a flame war...

for a nuts and bolts perspective, c++ will help you understand a LOT more than C# will. This will benefit you in making games.



If you want a job in industry, learn C++.

If you want to make your own smallish game, use C#. It'll save you a lot of grief.

C# is the future. There will be increasingly fewer reaons not to use it. Visual Studio 2005 has its best features (like automatic refactoring) exclusive to C#. It will be the language of choice for all but the most performance oriented applications.

Somehow I violate my own advice but using C++. But that's probably due to my illusions of grandeur (my game is going to be all this and all that and require every last ounce of performance, etc etc). Believe me I often wonder if I made the right decision. But it makes little sense to switch now.





I've been learning C for the last 2 years (almost 3 actually) and, now I'm learning Win32 for GUI Developement. I sometimes have thought about going the C# way because; C/C++ combined with win32, DirectX, OpenGL or some other API really requires a TON of code to make something basic that can be done in C# with a couple of lines, I soppose, from what I've seen and heard.

C# is a RAD (Rapid Application Development) language, like VB. That means that, you can code up an application pretty quick compared to doing it in straight up C or C++ with some API.

Do note that, C# is a bit slower than the other mentioned languages but I don't see it as a deterrent because most PC's nowadays are pretty FAST and that would certainly help make your apps more fast.

Take a look at my recent thread to give you an idea at the amount of code it is required to make a simple input GUI application.
Learning a programming language isn't really what matters, yes it does make it faster to write code once you've used a language for awhile, but any good programmer should be able to pick up a new language relatively quickly.

For this reason I would suggest learning using c++ out of these two as it makes you do more and should make learning c# later easier than the other way around, but mostly it shouldn't make to much different.

For windows development c# will probably take over from c++, but c++ will still be quite common for a while longer on linux and also there will be alot of code that will need to be modified/maintained that was written in c++.
Quote:Original post by xllx_relient_xllx
I've been learning C for the last 2 years (almost 3 actually) and, now I'm learning Win32 for GUI Developement. I sometimes have thought about going the C# way because; C/C++ combined with win32, DirectX, OpenGL or some other API really requires a TON of code to make something basic that can be done in C# with a couple of lines, I soppose, from what I've seen and heard.

C# is a RAD (Rapid Application Development) language, like VB. That means that, you can code up an application pretty quick compared to doing it in straight up C or C++ with some API.

Do note that, C# is a bit slower than the other mentioned languages but I don't see it as a deterrent because most PC's nowadays are pretty FAST and that would certainly help make your apps more fast.

Take a look at my recent thread to give you an idea at the amount of code it is required to make a simple input GUI application.


The part about couple of lines of code only applies to your initial window code/Windows GUI. C# is not going to magically increase your productivity in writing your Scene Graph/Renderer/AI/Game Logic. Most of the productivity which C# boasts comes from the .NET Framework which in essence is a library. There are libraries for every language and C++ has an abundant supply of them. Using a so called more "productive" Language is not going to reduce your development time anywhere as much as using a library which does what you want. Example, i can open my Rendering window in couple of lines using C++ using SDL/GLFW/GLUT as well. I can skip writing a proffessional grade Renderer by using Ogre(C# port Axiom as well) which will save you 2-4 years of your develoment time. It's the libraries/api's you use which help save your development time.

Im not saying that C# does not have libraries, there are many appearing. But the argument of the language increasing your productivity by 100% is just flawed. Most people compare C#'s huge .NET framework with C++'s standard library and reach that conclusion. Yes in terms of standard libraries, C# wins hands down especially for Windows development. But open your eyes to the thousands of excellent libraries for C++ and you will see that you can be just as/more productive in C++.

If you only plan to develop Windows games, you are safe with C# because i agree that there is no equvailent library to WinForms for windows GUI development. Then again you wont be using much of it for games. Also keep in mind that C++ is far more portable which is another strong reason for me not to switch.
C# and C / C++ are just tools.

Some programs are like screws, which work better with screwdrivers than nails. While others are like nails, which work better with hammers than screwdrivers.

There isn't a silver bullet. C# will not hinder your game knowledge any more than C++ will help it. That is why asking a generic 'vs.' question will rarely get you a definite or even good answer.

This topic is closed to new replies.

Advertisement