   C++ Vs. C#
  Hello, I am fluent in C# and I sort of know C++. Now I know there are some diffrences but which one is a better language to use because I am planning on completly learning C++. If there are pros and cons to them can someone tell me them.   
  amateur opinion:C# - rapid development, less memory leaksC++ - as of now, industry-standard, performance-intensive, more access/control of memory and hardware.(someone can rip a new one into me now)   ;  For game programming so far, were at a low enough level that C++ would be better.Overall:C++ wins(I'm just a big fan, so don't take the second part too seriousely ;) )   ;  I don't know if i should have started this in another thread but...What is the point of a pointer. Im used to C# and based on descriptions I read in a book it seems pretty useless. Why would you need to have a variable be a copy of another when you could just access that var??   ;  This have been discussed way too much, try doing a search, either on this forum or on Google.Anyway my opinion:C++ is a older language and based on C, which means it has some minor flaws.C# is a newer language. C#'s syntax is based on C++'s syntax, but much have changed when it comes to speed.Generally you can develop a faster application in C++. In C# you can faster develop an application (rapid development).One of the biggest disadvantages with C# is that it is so new and not supported, in my opinion it is easier to learn game development with C++ since there is more books and documentation for C++. Also if you want to take it to a more professional level, I'm pretty sure all newer(PS2/XBox/XBox360 etc.) consoles use C++, so here you can't use C#. XBox360 looks pretty impressive and might indeed support C#, but I don't think so.It is said that C++ is a little faster than C#, but that can be argueed, because if you finish your C# application before the C++ application and use the last time to optimize the C# code you might get a faster C# application, with less bugs. There is really no way to judge which is the fastest, for small programs finding Fibonacci numbers, doing simple number stuff C++ is generally faster. For big programs it depends on many factors which is the fastest.One thing you should remember is that C# is NOT a scripting language, some people might talk about it being interpreted at runtime. What really happens is that you translate your C# code into MSIL (MicroSoft Intermediate Language) code. Then the first time the C# code is executed the MSIL code is compiled at runtime to a normal executable. MSIL code is platform-independent, but the platform needs a way to translate the MSIL code into the platform's normal kind of executable.If you want to support other platforms C# might not be the best choice, not many platforms can understand MSIL. There is something called the Mono project for Linux, but I'm not sure how good it is.EDIT:Conclusion:None of them is THE best, C++ is a more accepted language, C# applications can be developed faster, given an infinte amount of time to create and optimize an application the C++ application will most likely be a couple of % faster (assuming the C++ and C# code is of equivilant quality), C++ is a little more portable (when it comes to game development, being able to develop for XBox, PS2 and XBox360 can be important).I personally use C++ because I really hate not being able mess around with pointers and memory, I also love the templates, I just enjoy coding in C++ more than C#. If I where to create a game I would sell I would most likely use C# (assuming it shouldn't be ported to the consoles anyway) and if I where to start out in game programming I would choose C++ because of the massive amount of books using C++ (yes the concepts apply to C# too, but for a beginner it can be hard to apply in another language).   ;  Pointers are useful for doing things like.... dynamic arrays. When you start using pointers with pointer arithemtic and such they become useful... and dangerous : )I have never used C# and know very little about it so I cannot really give an opinion on your other question   ;Quote:What is the point of a pointer. Im used to C# and based on descriptions I read in a book it seems pretty useless. Why would you need to have a variable be a copy of another when you could just access that var?As far as I know, C# uses pointers implicitly for reference types like classes. In C# you can do this:object myobj = new object();object myobj2 = myobj;and myobj and myobj 2 will both point to the same instance; changing something in myobj also changes myobj2.In C++ myobj2 = myobj would copy myobj to myobj2; the don't point at the same instance and changing myobj does not modify myobj2. Passing an object to a function to let it be modified would not work.In C++ you would therefore use:object myobj;object *myobj2 = &myobj;Now myobj2 will point at the same instance as myobj, just like the normal behavior in C#.   ;  Thanks I get it,   ;Quote:Original post by CTarIf you want to support other platforms C# might not be the best choice, not many platforms can understand MSIL. There is something called the Mono project for Linux, but I'm not sure how good it is.And the answer is, not very good at this point.  I love C#, and I love the idea of Mono, but it's a long way from production code.  Having had to (attempt) porting one of my company's applications over to Mono recently I can tell you that it's not much of a porting path.  However, the Mono source is freely available, and you can fix/finish it to suit your application which might actually make sense if you have the resources to do so and it fits in your situation.  That option might really work best, though, if you have control over the target environment, like an agreement with your customer that "We can provide this application for your labs if you allow us to install a custom Mono implementation on your Linux servers" or something like that.;Quote:Original post by KalasjniekofQuote:What is the point of a pointer. Im used to C# and based on descriptions I read in a book it seems pretty useless. Why would you need to have a variable be a copy of another when you could just access that var?As far as I know, C# uses pointers implicitly for reference types like classesThat is correct.  For anything other than a value type, C# uses pointers "under the hood".