Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was hoping for some direction or guidance regarding my C++ learning experience.

I have now read two books, from cover to cover, twice. The first was Ivor Horton's Beginning Visual C++ 2010 and Starting out with C++ Early Objects (7th Edition). At this point and after several months I feel like all I know how to do in C++ is create a basic class, define some methods, use the STL, and read and write info to and from the console buffer (cin/cout). But simple things like saving data to a file, reading from a file, printing, connecting to an FTP site, doing some basic graphic manipulation on the screen (not even DirectX/OpenGL), and so-on I can't do or don't even know where to start. I feel I still haven't learned C++ thoroughly. I think you guys get where I'm going with this.

I tried downloading SFML and compiling it in Visual C++ 2010 Professional. After quite a bit of time, I got it, but then I was lost. I followed the tutorials and one didn't work. I kept getting an error regarding a missing symbol and after an hour or so on Google, I couldn't figure it out.

Can anyone point me in a direction of where one goes from here? I would imagine others have been at this point sometime during their early days.


migration rejected from Apr 9 at 22:16

This question came from our site for professional and enthusiast programmers. Votes, comments, and answers are locked due to the question being closed here, but it may be eligible for editing and reopening on the site where it originated.

closed as off-topic by Robert Harvey, Ixrec, Kilian Foth, gnat, Adam Zuckerman Apr 9 at 22:16

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions seeking career or education advice are off topic on Programmers. They are only meaningful to the asker and do not generate lasting value for the broader programming community. Furthermore, in most cases, any answer is going to be a subjective opinion that may not take into account all the nuances of a (your) particular circumstance." – Robert Harvey, Ixrec, Kilian Foth, gnat, Adam Zuckerman
If this question can be reworded to fit the rules in the help center, please edit the question.

Did you try looking on the SFML forums for help regarding your missing symbol problem? The author of the library, Laurent, is active on the forums, so you should be able to get some help there (or if you post the full error message here you should be able to get an answer). Try not to get too frustrated, problems like this tend to come up a lot when you first start up. – Alex Sep 10 '11 at 2:42
Probably the best first step is to ask yourself, "What do I want to do with C++?" What are you interested in? What kinds of projects are you interested in tackling? Game design? Compilers? Console utilities? No one else can tell you where to go from where you're at, you have to decide that yourself. Pick something you're interested in and go from there. – Chris Vig Sep 10 '11 at 2:43
I'd really love to learn for example how to write a program to burn an image to a CD, or how to develop an FTP client, or how to ping a website or something. Maybe these are very complex things, I'm not sure. – user36371 Sep 10 '11 at 2:54
Those are good concrete goals. For example, say you want to build an FTP client. You'll have to learn about socket programming - a Google search for "C++ sockets tutorial" should get you moving in the right direction. Next you'll need to learn about the FTP protocol - again, googling "FTP protocol tutorial" brings up some good stuff. Maybe then you'll want to add a GUI on top of it. There's plenty of good C++ GUI toolkits out there. It sounds like you may be losing sight of the trees for the forest - I'd focus on one small piece at a time, learn it well, and then move on to the next step. – Chris Vig Sep 10 '11 at 3:04
Sounds good. I will do some online searching as per your suggestion, but I think I'm gonna search Amazon for some books on sockets and the ftp protocol as you suggested. Something about having a book that's been edited and organized for teaching seems to help me a lot more! Cheers! – user36371 Sep 10 '11 at 3:11
up vote 8 down vote accepted

First off, your situation isn't at all unusual. Most, perhaps all, programmers will experience a moment when they realise that the basic book knowledge that they've acquired by slogging through some weighty tome seems to have left them entirely unprepared for making the jump to "real" coding and problem solving. I went through it, you're going through it, and I'd wager that 99% of the people who contribute to stackoverflow have gone through it at some stage or another.

The bad news is that there's no simple, surefire way to proceed from being someone who's read a few books to being someone who can actually implement that knowledge in real, living, breathing code. The good news is that with some perseverance and the right attitude, you'll eventually make that leap too.

Here's my experience. I started out in pretty much the same way as you, reading lots of books and taking some classes. There were a few steps I took to get to the stage where I finally felt confident in thinking of myself as a semi-decent programmer:

1) It helps to have some sort of idea of what you want to end up doing. Once you have a goal to aim at, learning becomes much, much easier. In my case, I was a physics student who knew that once I finished my (formal) education, I wanted to go to work designing and implementing automated trading systems. (Hey, I'm greedy, I admit!) That helped me to see that I'd benefit from learning as much C++ as possible, as well as knowing a thing or two about networking, concurrency, and machine learning. In other words, having a specific goal in mind helped me to identify the steps I needed to get there. I tailored my actions and education accordingly.

2) I took every opportunity to actually work as a programmer. Vacation jobs doing even seemingly meaningless code maintenance turned out to be invaluable experiences since I saw how code is actually written by real people (which is a huge help in bridging the gap between what you learn from a book and how that knowledge is applied in the real world).

In addition, I benefited immensely from having actual, experienced coders to talk to. Having someone next to you who can explain exactly what happens in a build process, the importance of documentation, or what the compiler is really doing when you pass it some obscure flag is truly invaluable. Reality really is the highest-bandwidth communication channel you can get your hands on!

3) I started contributing to a specific open source project that was relevant to my area of interest. This, actually, was the most difficult part since I was coming into a pretty huge existing codebase and didn't have the benefit of having someone who already understood the architecture sitting next to me in the office. Open-source involvement is a great way to learn, but it takes more effort than many people would lead you to believe.

4) Be realistic, hard-working, and above all, humble. Becoming even a semi-competent C++ programmer took me three years of hard work. It took longer than I expected. It was frustrating, demoralizing, and downright horrible at times, especially at the start. But I stuck with it and kept looking to learn from others. It was not only a great experience but turned out to be pretty lucrative as well. And learning C++ gave me the confidence to go on and learn other languages too (C#, Java, Erlang, Scala, Python, and the like).

Good luck with it. You'll get there in the end.

Thanks for taking the time to provide so much info about your personal experience and to provide some encouragement. I enjoyed reading it. It sounds corny, but it gave me a sense of hope. (: – user36371 Sep 10 '11 at 6:02

Do hard things. Doesn't matter what, if it's hard you'll learn something from it. You'll slam your head into walls more times than you can count but if you can't overcome the frustration of climbing that mountain then perhaps programming or C++ isn't for you.

To allude to Chris Vig's comment, do things that interest you but I'd also say do things that C++ is necessary for. 3d graphics, high powered simulations, really anything that needs speed and is too complex or large to efficiently implement in C without tremendous bookkeeping.

The few times I've looked at C++, I've used Accelerated C++ as a baseline to jump in. It sounds like you really want to program for Windows so I'd look into learning Windows system internals as well.

As an aside, a place to start might be doing a Source Engine mod, it might sound like an impossible order but that's the point. You need a goal, something focus on other than just "learning C++". Once you've got that goal the rest will fall into place. Above all, learn to ask good questions about code. Find the best C++ question on Stack Overflow and emulate their style and level of sophistication.

Lastly, don't give up. C++ has a reputation as a hard language and it takes a long, long time to learn. It is perhaps one of the truest examples of Peter Norvig's "Teach Yourself Programming in 10 years."

I love "Teach Yourself Programming in 10 years." That sounds about right. (: Thanks for that. I just ordered Accelerated C++. I find myself learning faster and staying more focused when I have a book in my hand to go through. Learning from forums and websites seems more challenging because examples aren't always tested, grammar mistakes drive me crazy, etc. (: – user36371 Sep 10 '11 at 3:15

I will 2nd the comment about '10 years'. I'm at about 10 years since I first learned how to compile a 'hello world' program. I would say I know about 85% of the language and its core applications.

I still struggle with multithreaded programming since none of the places I worked at use it. Now that C++ 11 came out and boost has doubled the # of ways you can use C++, I feel like a n00b all over again. But don't get down on yourself, even though I am far from knowing it all, I have a great job at a huge company that treats and pays me very well. I just keep a humble and learning attitude as much as possible.

I know you wrote your question a couple months ago, so maybe this will be read by someone else, but here are some areas I would recommend: write small programs that simulate gambling games such as roulette, blackjack, lottery or craps. I used to do things like see how many lottery tickets I'd have to buy before I won, or see what happens if you double your bet everytime you lose, or if you "count" the cards, can you make money. They kept my interest, and then exercised my brain to apply the C++ I knew.

Then, rewrite them using "real" C++. What I mean is, solve the problem once however you can, then actually create classes and try making an object-oriented design that does the same thing, using ALL stl/boost containers and algorithms. The goal should be that almost everything is inside of a class, and that operations happen on classes at a time.

Another fun area to use your programming is with images. PPM format is the easiest color format to write to. So write a program that creates a rainbow, then try doing an FFT frequency filter on it, then display the image. That is good practice and it gives you something useful as a result.

C++ templates are often overlooked. There are guys that are 50+ years old and they've been programming for 20 years and dont know what a template is. Learn them, learn why they're good, and when to use them. "Templates are static polymorphism" - understand what that statement means, so that you can demonstrate it in an interview which will increase your chances of getting hired.

Then for a bigger challenge, start writing multithreaded programs. That will give you a major edge over others. Really understand how they work so when you get an interview, you can prove that you own it. Get yourself stuck in a few MT bugs and learn how you try to solve them.

That's my advice.

Hey. Lots of really good feedback. I read everything you wrote. Thanks for taking the time. I like a lot of your ideas and I plan to tackle some of them. I've also since posting this approached my professors and ask for challenging assignments that are within my capabilities of solving. I've written an oil spill simulation, a palindrome search program using all c strings and dynamic memory allocation. Anyway, thanks for the feedback! – user36371 Dec 2 '11 at 22:29
you can email me if you want more C++ / career advice: a20 cat 111 snake 98@hot deer mail. elephant com remove all animals and spaces. – Timmah Dec 5 '11 at 21:43