How to learn to program C++ the right way -


I was doing a lot of programming in C / C ++ for its academic courses and I have a very good under the impression Understand this But recently I had to work in a Bluetooth application, which was a server and client implementation in the Linux box and embedded systems. I learned blues bluetooth API, socket / network programming and coded it.

However, I have had a lot of problems in the way of memory leaks and split errors and other memory related errors. The code became more complex, but lost control of all the indicators and threads and sockets. It started to think that I had so much to learn that he had not said in the original C / C ++ books. That's why I want to ask about the resources that will help improve the code in C / C ++ professionally. Especially for Linux / Mac Environment (GCC Compiler)

EDIT: Changed C was creating C ++ due to confusion.

This question is very big, very big way. / P>

In short, you have at least one thing less go to can other than what you're going to hit many times by segfaults which holds the focus you can do, constantly finds bugs, And always believe that the bug is in your code rather than the compiler or some solid library you use. When you are stuck, post specific, narrow questions with the relevant code here. We will help you

Now, here it really depends on the language you use: C or C ++? These are very different terms that will not be enough if it is a C ++ you will have the primary advice, he Araaiai access at all times . If you are using C, then always be aware of that indicator, when it is pointer, and when it is released, and most importantly, with the Pointer Point, at the same time, always initialize your data. Doing, especially the pointers. Never show up at the time of big-oh performance and do not show its time.

That's it. In addition, post your specific issues and we will work them. This is the right way to know.


Comments