Operator overloading is one of the fundamental operation which come across often in a C++ program. It is bit cryptic in syntactical side as well as often a misunderstood topic amongst new programmer. I will try to explain this as a series of C++ related notes (as I like to call this) following this post.
I do not have administrative rights on a linux server (openSuse Linux) I am working on right now. So installing anything is not an option…
Thread-safety of a function refers to the fact whether a function can be safely called from multiple threads simultaneously. Safety here means that even if multiple threads are executing the function simultaneously the data integrity is intact and is not intermingled.
Memory leak is a phenomenon where a running C/C++ program or a running process or thread dynamically allocates memory block from the heap but fails to free the memory block when it no more requires the memory. This happens due to programmatic error where the handle to the allocated memory block gets lost. Over a time if the same programmatic entity (a process, or a thread or a function) comes into action repeatedly and leaks memory, all the free memory of the systems goes away and eventually the systems throws the dreaded "Out Of Memory" and crumbles down.
valgrind is a popular tool which can detect memory in run-time. This blog post discusses how to install, and run valgrind at linux command line to detect memory leak in a sample C program.
This blog post discusses the polymorphism with the help of C++ language. The mechanism to implement polymorphism in C++ is known as Virtual Functions. With the help of a simple example I will try to explain the concept as clearly as I can.
Why virtual functions are required in C++.
Auto variable An auto variable is a variable which is declared within the scope of a function. We call it local variable as well.…
This blog describes the steps to use eclipse as your linux kernel source code browser.