C# vs C++ I need to know!

Started by
44 comments, last by Kylotan 18 years, 10 months ago
Quote:Original post by rayce
Quote:Original post by Grain
I'd learn C first, and once you have a firm understanding of that than jump to C++, only learn C# if you want to be stuck to windows platforms.


Bad idea.
if you ever read this, i'm letting you know that learning C is a big mistake.
it teaches you bad structural habits when you should be learning object orientation in C++([cool]) or in C#. it's syntax is also harder to understand, making C++ easier to learn. things like output and memory managment are easier in C++. believe me, i know this.
as for C#, all i know is that it is easier to learn than the other two, but is slower and doesn't give you as much power and control.
I would stick with C++. that'll make C# no sweat.
Stay away from C [evil].


I'd like to know how you came to this conclusion. It sounds rather bogus to me, and unsound advice at that. But I could be wrong, so please elaborate.
Advertisement
Quote:
it's syntax is also harder to understand

C and C++ are pretty similar in syntax, arent they?
Quote: ... memory managment are easier in C++.

their memory management models are nearly the same, except the usage of
the "new" keyword. Not such a big difference.
vertex *v = (vertex*)malloc(sizeof(vertex));v->constructor();// is basically the same asvertex* v = new vertex(parameter1);


and using structures in C do give good OOP practice

// Ctypedef struct vertex{    float coords[3];}vertex;void empty_vertex(vertex* v){    v->coords[0] = 0.0f;    v->coords[1] = 0.0f;    v->coords[2] = 0.0f;} // is the same as...// C++class vertex{    float[3] coords;    void empty_vertex()     {        v->coords[0] = 0.0f;        v->coords[1] = 0.0f;        v->coords[2] = 0.0f;    }};
Over the past few years I have learned or atleast tried to learn many languages including &#106avascript, Visual Basic, Python, C, and C++, and many others. After all the tutorials, and guides that I've read I've realised that it's not that a language is "hard" but how it is presented to you. Some tutorials make things so easy, then you'll go to a different tutorial for the same language and it will be like trying to read Chinese. My advice would be to stick with C++. Just go to google, or the gamedev.net archive and read the first chaper/section of a few tutorials. Find a tutorial where the writer explains things in a way that makes sense to you. It's well worth reading about 'if' statements 10 times to pick out the right tutorial. Good luck man.
First of all, I don't know much about C#, and as far as I know not too many games are developed with C#.

So I am just giving advice from my own experience when I was working in the gaming industry around a year ago.

My company was working for PC & Mac games.
The language that we use were both C and C++.
By the way, C++ is a superset of C, which means all the things in C can be applied in C++.

My suggestion is I think you should learn C++ because the language is aimed for software to be robust, maintainable, and extensible.
In other words, C++ leads you to Object Oriented Programming (OOP) and Object Oriented Design (OOD). I will let you do the homework on finding more about OOP & OOD.

As far as I had known and experienced, the current trend for software development in gaming and non-gaming industry gears towards to those 2 concepts.

If you would like to more about the reason, please feel free to post the questions because I know that I am still missing alot.

For learning C++, I would like to suggest this book that is easy to read and understand, imo:
"The complete reference C++ 3rd edition" by Herb Schildt (I don't know if there's any newer edition).

For learning OOP & OOD, try to read this one:
"Head First Design Pattern" by Eric and Elisabeth Freeman (the samples code are in Java, so you need to learn some Java syntax -> try to learn from "Head First Java").

Hope this is useful.



"You need a long-term goal: keep trying and make a small step every day. Don't give up! Keep going, and that will be the shortcut to success." -- Nobuo Uematsu (Final Fantasy Composer)
I would like to reccomend the "Learn C++ in 24 Hours" book. It's really staright forward and explains things well.

http://search.barnesandnoble.com/booksearch/isbnInquiry.asp?userid=YS4HrOYBeh&isbn=0672326817&itm=1
Quote:Original post by GamerSg
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.


I never said, or implied, C# will increase your productivity by 100% if you're exclusively referring to me =P
Quote:Original post by Grain
only learn C# if you want to be stuck to windows platforms.
Only give advice if you have the slightest idea about that which is being discussed.
Quote:Original post by Brandon N
Quote:Original post by Grain
only learn C# if you want to be stuck to windows platforms.
Only give advice if you have the slightest idea about that which is being discussed.


Tell that to the person that recommended herb schildt.
Personally I'd say C is a waste of time. It teaches you nothing you wouldn't also learn with C++, while at the same time hindering you because it lacks some very convenient features. It's no easier to learn than C++, but a lot less useful. ;)

But I still think the only possible answer is "It doesn't make the least difference, no matter what people tell you".

What you're learning is programming, not C++ or C# in particular.
Once you know programming, learning either of those languages is a piece of cake. (The same goes for C, if you feel like learning that. But unlike C++ or C#, I don't really see any reason why C would be a good idea)
Quote:Original post by whitin
Mainly because I am only 15, just going into 10th, and C++ may not be the standard for game programming by the time I get out of highschool.


So what? It doesn't matter if C++ is going to be the "Industry Standard" or not in a few years.

Here's the most important thing any programmer (games or otherwise) needs to know and understand:

*** You must be willing to learn new languages, methodologies, and techniques throughout your career (professional or hobby-wise). ***

Here's some more important points to consider:
1) Learning how to program does not happen overnight. It takes years to develop your skills.
2) Languages (and platforms) do not matter. Programming concepts matter.
3) You always learn faster by doing. Write programs no matter how small and simple. Don't make the mistake of just reading about programming.

Since you already started with C++, continue with C++ for some time. Get at least two intro-level books, by two different publishers. Start simple and pace yourself. If you are still frustated after a month or so, switch over to C#. Good luck.





This topic is closed to new replies.

Advertisement