This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
This question is impossible to answer without any context. Whether it is worth learning any subject (a programming language, or anything else) depends entirely on whether you think you are personally going to need it for your job, or for other purposes.
If you're aspiring to become a game programmer, then you'd probably want to learn C++, because most big, high-performance games are still written in C++. If you want to become a .NET developer, you'd probably want to learn C#.
In general, if you want to become a good software developer, it's good to learn more than just one programming language.
The two languages are very different from each other. C# is more similar to Java™ than any other language.
There are problems about learning programming with .NET and C#, particularly that a particular IDE (=integrated development environment) is used. So your learning is liable to be linked to that IDE. You never see a lot of the code, which is generated automatically.
The custom in C++ (and C, and Java™) is to write all the code by hand, so you actually see everything you use. C++ has a particular difficulty, which might make it better for learning, that it still implements pointers. Pointers are difficult to learn, but once you have understood pointers, much of the rest of programming is easy by comparison.
Campbell Ritchie wrote:There are problems about learning programming with .NET and C#, particularly that a particular IDE (=integrated development environment) is used. So your learning is liable to be linked to that IDE. You never see a lot of the code, which is generated automatically.
Although Visual Studio is often used for writing C#, it's not necessary. The .NET framework comes with its own command line compiler, C:\WINDOWS\Microsoft.NET\Framework\vXXX\csc.exe or C:\WINDOWS\Microsoft.NET\Framework64\vXXX\csc.exe, where XXX is the .NET version. Combining that compiler and writing the code by hand (as you can do with Swing / AWT applications) allows you to write complete applications without any IDE.
The other way around, you can use Visual Studio (or any other IDE like Borland's old C++ Builder) to create C++ applications using an IDE.
Personally, I use SharpDevelop because I'm not as familiar with C#'s GUI development as I am with Java's (and don't like Visual Studio Express, and can't afford the non-express version), and for the few .NET programs I write I prefer the quick approach.
The answers here are very good. C# and C++ (as well as Java) are great langagues. But the considerations already mentioned apply.
I think C++ is particularly fascinating because of all that it allows you to do with user-defined data types (classes) -- including operator functions, customized output formats for new data types, etc. -- but then again, I'm biased.
You'll also find the capabilities of the STandard Template Library (STL) now standard in all nearly all shareware compilers, to be amazing.