Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

My programming classes in school were C++, but I ended up working a job doing C# for the last few years. If there was a position that required say 1 or 2 years experience in C++, would my experience in C# be worthy of consideration? How effective could I be in such a position? So do I need to start out as an entry-level C++ programmer to gain the necessary experience?

share|improve this question

closed as primarily opinion-based by gnat, Bart van Ingen Schenau, GlenH7, Dan Pichelman, MichaelT Oct 18 at 2:07

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

4  
The hardest part will be learning the idioms of C++ and the "correct" way of doing things. In C#, things like memory management and bounds checking are baked into the language and the framework. In C++ there are many more ways to shoot yourself in the foot. –  Robert Harvey Oct 3 '11 at 22:51
1  
@RobertHarvey: Only if you've never heard of smart pointers. Or containers. –  DeadMG Oct 3 '11 at 23:07
10  
@DeadMG: I don't know what you mean by that. Even if you've heard of them, you still have to learn them. –  Robert Harvey Oct 3 '11 at 23:08
2  
The Effective C++ series is a lot more mind-bending than the effective C# series. –  Job Oct 4 '11 at 1:35
    
@Robert: Well, if you do containers and smart pointers, then you don't have to manage a lick of memory. And learning them is C++ 101. –  DeadMG Oct 4 '11 at 16:03

7 Answers 7

The problem here is that C++ and C# are, fundamentally, extremely different languages with different approaches to many problems. It's easy to lump them in as "An OO language", but the simple fact is that many C# idioms are considered to be very bad code in C++.

If you actually know the differences and what C++ idioms look like, then I see no reason that it shouldn't be fine.

share|improve this answer

I was in the same boat about 2 years ago. Your c# experience would probably not be worth as much for a c++ job as c++ is for a c# job. That said, if you know how c# actually works (very few c# programmers actually do), and learned your c++ well then the c++ will not be the problem. What will be the problem is the way you have grown accustomed to certain design patterns which will be too high level for c++.

For instance, going from the nice ADO.NET data access model to using cppcon for mysql access, System.Collections.Generic to using stl, multiple-inheritence, garbage collection to cleaning up your memory in destructors and so on... all tend to be tough transitions. C++ isn't the problem, learning the libs, design patterns, and how to use them is the challenge. Most recruiters don't realize this. If you can do basic design and can use the actual commonly used features of c++ then you should be fine in the interview.

However, ready for the job is a different story. It is a fun challenge though, I hope all goes well.

share|improve this answer
    
All the C++ jobs I see want 2-3 years of experience in C++ but mine is in C#. This is really frustrating to me, I want to do C++! You're right about the recruiter, they shot me down. How can I ever get this experience if nobody will let me try? I am confident that if someone let me in the door I could learn quickly I just don't know how I can get through to them on that. –  ioSamurai Oct 5 '11 at 2:38
    
I jumped on a c++ project at my current job. That is probably your best bet. Or, you can always get on an open source project that is in c++. –  Jonathan Henson Oct 5 '11 at 2:56
    
@Ryan As Jonathan said, there is plenty of ways to get experience in C++. Atleast where I am from, you have to prove you have experience (instead of the popular statement; having 1 year of experience five times over). This works both ways - someone without much "paper" experience can get a chance to prove him/herself aswell. Just make sure you actually know C++ before you try! –  Max Oct 14 '11 at 12:46

I cant speak for every employer but I personally view programming as the skill and language specifics as a nice to have. Its still quite possible to get hired in another programming job that isn't your main skill.

Having said that its very very unlikely I would hire someone that had absolutely no experience in the language I'm hiring them for. Spend a few weekends learning and have a couple of pet projects to bolster your CV. Even small ones prove you are capable of learning and keen.

share|improve this answer

You are exactly in the same situation I was in 4 years ago.

I did some C++ during my studies, but I hated it. I did a lot of web dev when I could on my spare time and got a job in that field.

When I moved I applied for a C++ job which had 2 years of C++ experience as a requirement. Well I refreshed my C++ memories before the interview and when the time came for the tests I managed to get away with a few things I wasn't so sure I was doing right.

But most of the interview was about problem solving and creative solutions and C++ ended being just a minor factor.

So the chances really depend on the employer and the positions they have.

If you are going through a recruiting agency you will "probably" be told your profile doesn't match. But with a real employer your chances are way better as they really know what they need.

share|improve this answer
1  
just make sure you know what a virtual destructor is so you make it past the phone screen. –  Kevin Oct 3 '11 at 23:32
2  
As the others said it make sure you remember the few basics of memory management in C++. It is the fundamental difference. Otherwise concerning libraries and frameworks Most (large) companies have their own libs and wrappers, so they don't expect you to know their implementations. Contrarily to C# where most of the high level libs are backed into the .net framework and the requirement will be to know a set of libs relevant to the position. –  Coyote Oct 3 '11 at 23:36
    
So did you get the job? I'd really like to move into doing C++ but my lack of documented experience is closing doors, not sure how to build it up otherwise. –  ioSamurai Oct 5 '11 at 2:40
    
Yep... Worked there for 3 years. It was a great experience... but I had to do some catchup with C++ particularities the first few months. –  Coyote Oct 5 '11 at 3:08

It depends. If you can answer some basic interview questions about pointers and such, then you should be fine.

It's also beneficial if you can list the differences between C++ templates and .NET generics.

Other than that, it's pretty easy to catch up with the rest as you go along.

share|improve this answer

Yes. It may not be as relevant as C++ experience, but it is good.

Good employers are going to be interested in how you think, more than how many years of a specific language you have.

An entry-level C++ position is fine: you can learn quickly, and do a great job. A good company will give you plenty of opportunity to grow. If not you can go somewhere else, and have both C# and C++ experience.

share|improve this answer

It really does depend on the nature of the business you're applying to. If they're looking for someone who has good OO-based programming and architecture skills, C# is likely as good as the next thing.

If they take pride in their software's speed/responsiveness, then you're going to need to know your algorithms as this matters more than micro-optimisations - Hash Tables versus Linear lookup, etc. C# is still relevant here, but you'd need to demonstrate understanding of the performance characteristics - not everyone knows about ngen.exe, for example.

If they're into embedded/mobile and/or non-garbage collected environment, you really need to know about how to effectively manage memory. Smart Pointers, as @DeadMG pointed out, are key here, but so is understanding the memory allocation profile. Games programmers often pre-allocate large arrays of objects and recycle them in order to know the memory requirements up-front and reduce unknowns on a per-frame basis. This is also the technique used in the scrolling TableViews in iOS.

If there's any integration work, you're likely to need C-level expertise in terms of marshalling data between languages (like P/Invoke) but also byte-level understanding of how these data structures may get used, which is not common practice in C# in my experience.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.