I'm currently learning C#, but wondering whether it is beneficial to learn some C++ before/at the same time as in order to understand the concepts a little better? I've got a C++ book and it does seem rather useful, especially explaining pointers and references.

I'm an expert in neither language, but I think learning C++ before/at the same time as C# could confuse things if you're new to programming. I think there are merits to learning either first [learning c++ first gives you a greater understanding of how systems work, very platform nonspecific etc and C# will allow you to get more done, quicker as a new programmer which is good for motivation etc etc] , but I'd recommend getting a solid footing in either before directing your attention to the other.
–
AnonymousApr 12 '12 at 9:01

There are enough books on C# to help you learn most of the aspects of programming from introductory texts to parallel processing texts. Have an objective and focus on it.
–
Emmad KareemApr 12 '12 at 9:59

5 Answers
5

C# and C++ are quite different languages, they might have similar syntaxes but that's where their similarities stop. Now, if you were already familiar with C++, yes, that knowledge would be useful (but not required) while learning C++ or any other language, really.

Disclaimer: I work in both languages (and a few more) on a daily basis.

When I was studying CompSci at University (studying Comp Sci & Games Development), the curriculum they used taught us C# in the first year (to get the basics of CompSci and Software Development), we moved onto C++ in the second year (so that we could study, what you are calling "the concepts" and some hardcore Comp Sci ) and in the third year we moved onto C and Assembly (so that we could see the difference that speed and efficiency make to the design and the amount of work you have to put in).

I'd already studied a little Assembly and C in my college days (I'm from the UK, so I'd have been 18 at the time. I studied Electronics and Telecommunications, if you're wondering). So by the time I got to Uni I already had an understanding of why certain aspects of C# where designed the way that they are (admittedly, this was back in '04 and the language has changed quite a bit since then).

Oh, by the way, I also studied Japanese at Uni, too

I can't imagine what it would be like studying them both at the same time. I suppose it depends on how far down the rabbit hole you want to go, but I'd steer clear of C++ for now as you might end up trying to learn too much all at once. Some people can do this, but most people can't - I'm not trying to offend anyone, but that's the way it is.

I had a friend at Uni (who was new to software development) who decided, during the first few weeks, that he wanted to write his own operating system and that C# wasn't going to cut it. So, off he went to the library to read up about C++ and C. To be fair, he studied really hard, and learned a lot about the C family. Except that he failed all of his assignments (on account of programming them all in a C++/C# hybrid) and never got anywhere with his operating system (on account of being a 1st year student with grandiose ideas). He ended up dropping out, after taking the first year twice more.

I suppose the point I'm trying to make is: It's great that you seem to have the enthusiasm to learn and progress ("...wondering whether it is beneficial to learn some C++ before/at the same time...") and that will serve you well in the working world (from my experience, anyway. As employers tend to prefer developers who are willing to learn). But you need to be careful not to confuse yourself by learning too many things all at once.

It's great to have more than a single tool on your belt, but the ability to know and understand (and that's the key point) why these tools differ and when you use them is more important and useful.

For instance: I can knock up a basic server/client program in minutes using C# and .NET and it will make use of all the memory management and auto closing of ports and sockets provided by .NET but it won't be very efficient.

I could do the same thing in C++ and it would be efficient, but it would take, considerably, longer to create and would involve writing a LOT of custom code. There would be no memory management provided for me, and no auto closing of ports and sockets. But it would be really fast and efficient.

Although learning both languages at the same time may confuse you because of what linguists call false friends, learning one after the other will be of benefit to you. The order in which you learn the two languages does not matter much, as long as you make an effort to master both in sufficient depth. The second language will give you an additional perspective that will prove very useful to your understanding of general programming concepts that are independent of your programming language.

Some people find that learning two or three foreign languages at a time more effective than then they concentrate on one. As you can expect most of the people will find this approach not so effective..

So I recommend give it a try, learn both at the same time. If you find youself confused, then switch to one.

I definitely suggest learning one after the other. You will most likely get confused between the two of them if you learn both at the same time, that's what happened to me when I learned Python and Ruby at the same time. It would be helpful though, to maybe learn a little bit of C as you go along with C#. For some good C++ resource recommendations, check out: