I'm quite new in programing and i started learning c++ but i want to know what are the differences between c++ and c#! (because all examples and learning lessons, from msdn Visual Studio 2005, are written in c#)
I know this is a stupid question for all of you but i heard about c# only in Visual Studio.
I really need an answer to this question because i don't know what lenguage to learn!
Thanks

Differneces between c++ and c#!?
TurboTom
Ok, very good! My first language was C++ as well (actually C at the time).
CLI stands for Common Language Infrastructure. You can find a bit more information here. Check out the .NET framework development center for video's and articles, and you will find out more how all of this works.
Good luck in your quest! Be persistent and have patience, it will pay off. If you have any questions, don't hesitate to ask them in these forums. We will be happy to answer them.
Omicron
being totally fair, i have programmed in c++ for a while and i just find it to be a pain. I am currently working with directx on c# and it is 10 times easier and quicker to do things in c++.
i'm not going to write the next unreal engine so why am i completely concerned with every inch of speed i can get most moniters are on 75-85 hertz, what do i need 1500 fps for
i hope you see my point. i think c# is the way to go in your case.
Gee_Coder
I just want to clear things up a bit regarding C++ from Jelle's post:
The new managed version of C++ (C++/CLI), included with Visual Studio 2005, targets the .NET runtime and includes all the major features of C# including generics and reflection.
Tony Hildingstam
After all, i decided to learn and work in c++! Right now i'm reading a c++ book, but i hope to learn Visual c++ and THAT c++/cLI(what means cli)
PsilentDev
Hmm yes, that's a very good point. I wasn't very clear in the distinction between C# and .NET. .NET can be used from within managed C++.
In my post I kept managed C++ out of the equation actually. Managed C++ gives you a lot of the pros of the .NET framework, but I personally would advice not to start off with managed C++. I think the learning curve would be too steep. But that's just my opinion.
vmaceda
C# is a newer language with a Java-like syntax and feel to it.
C++ is more complex and while much of the syntax is similar to C#, some parts are radically different - I'm thinking especially of C++/CLI vs C# and handling of arrays for instance. If you restrict your C++/CLI code to the managed sphere then your C++ code will look fairly similar to C#.
If you want an overview of C# vs C++, download our Instant C++ (C# Edition) demo.
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB.NET to C# Converter
Instant VB: C# to VB.NET Converter
Instant C++: C# to C++ and VB to C++ Converter
Instant J#: VB.NET to J# Converter
Clear VB: Cleans up outdated VB.NET code
Phil Kauffman
I consider C# to be a bit more high level than C++ is. C++ gives you a lot of freedom which gets you full control, but also the freedom to make more mistakes. For instance, C# uses garbage collection, a system that frees memory once the memory is not used anymore. In C++ you will have to free memory yourself. This has pros and cons: you have complete control over the allocation and deallocation of your memory in C++ and you may be able to get a better performance out of your own memory manager, but it comes with a price: the numerous amount of memory leaks when you forget to free memory, for instance.
C++ and C# are both languages that target a different audience. I don't see them as competing languages. In games development, which is what I do, C++ is still the way to go. For many reasons, among which:
-The performance. Don't get me wrong, C# has great performance, and I love its garbage collector. Still, at the moment I think you will still gain more control and performance in C++ than in C#.
-The support. Since C# is a Microsoft platform, you will have to think clearly whether C# will be supported on other platforms. In our case, we develop cross-platform, and also for the Playstation 2. I doubt whether Sony is going to cooperate on a C# compiler or .NET support
.
-Third party libraries. Although .NET offers a lot of features in its interop layer, it may take work to get third party libraries running in C#.
C# and .NET have a different target audience. I am in the tools section now and C#/.NET is IMHO currently simply unmatched for building tools. C# is more targeted at Rapid Application Development and it is just so extremely easy to get tools up and running quickly. The .NET framework is written quite nicely and has a lot of code in it.
Ok, some more differences between C++ and C# (I just pick a few, you might want to search the internet for a much better comparison).
-C# has generics (in 2.0) where C++ has templates. More pros and cons: C# generics are typesafe, but are restricted in their usage. This is safe, but C++ has extreme power in its templates, but templates are less type-safe and may be very complex.
-C# has reflection, which is uhm... a system to get information about the code you write. This is imho extremely powerful and really lacking in C++.
-C++ has multiple implementation inheritance, whereas C# has not. C# has multiple interface inheritance. There is a lot of discussion about this issue and I can't get into this too deep. People say C# will eventually offer a system that offers the same power as C++'s multiple inheritance, but... uhm... better designed. This will become available in one of the upcoming C# releases. Read the blogs about this.
But, as I'm writing this, I think you're probably not interested in these 'details', since you're a beginning programmer.
If you know C++, it will be easy to hook into C#. It is less easy the other way around. On the other hand, C# is easier to get started with. It is a young language and it is currently much 'cleaner', less perverted by time. C++ went through quite some changes and it takes years and years to really get the language right.
C#: safe, easier, RAD
C++: more complex, more power
With great power comes great responsiblilty
.
Pff I hope this brainstorm helped out a little
.