To answer you well (on top of what Ceset already said), you would have to take into consideration the advantages and disadvantages of C++/C#.
C++:
C++ will probably always be used as long as we use silicon-based computers. It is very robust, literally any system can support it (depending on the quality of the compilers), but this doesn't mean that one can
easily port it (unless the program only uses pre-made cross-platform libraries like OpenGL). Also, by the very nature of what C++ is, it is the fasted language to use for run-time (though the difference in speed between C++ and C# is getting closer...but it will probably never cross).
C#:
Due to the fact that C# runs through an abstraction layer (a "virtual machine"), it doesn't run as close to the hardware as C++ does. However, it is much faster to produce the end result and, like Java, you don't have to worry about having to port it on the most part -- the abstraction layer (that you don't really deal with production-wise) does that for you.
I should point out that C# is no longer Windows-Only.
In fact, Microsoft has been making quite a few good decisions since Satya Nadella became CEO, but that's beside the point.
So which should you learn? If you are only to learn one, as a game programmer I would say "C++." However, if you are going to be working on more business-oriented programs, I would probably say C#.
HOWEVER, you should
definitely learn both if you can. C# is a great choice if you need to get something done fast and you are not at all worried about the small performance drop. If you are working on something that requires as much power as possible (like a game, or driver) then C++ would be the language of choice.
NOTE: This is just talking about C++ x C#. There are many other languages out there that each have their own uses. That is something that you should try researching a bit more on your own. One last thing: As Ceset quoted -
If you can program in C++, you can program in any programming language |
With that in mind, if you are going to dedicate yourself to just one language (which, in all honesty, is a bad idea), then C++ should be the one. At least, for now.
EDIT:
After reading through the link that Ceset posted, I would personally have to disagree with him on the post part. The part that I do agree with (as you can see) is that C# is easier -- and thus faster -- to develop with than C++.
Managed languages like C# has a LOT of benefits. I'm not saying that C++ is flat out the best language to learn. I'm just saying that I disagree with the "C++ is a sinking ship and should be left behind" idea.
...though, this is coming from a game developer, not a business software developer (and yes, I do know that C# is used in parts of the game industry).
And in C++'s defense, the only reason why C++ still has so much deprecated back-end stuff is because companies still use the deprecated stuff. Here is a link to the BigThink channel where Bjarne Stroustrup mentions why it is so bloated:
https://youtu.be/JBjjnqG0BP8?t=4m28s
I put it to where he mentions it. With that in mind, I would say it is a
good thing that C++ hasn't cleaned out the old stuff.