Posts Tagged ‘efficient programming’

Common C++ Mistakes Programmers Make

Written by Ali. Posted in C++

c++ mistakes

C language provides a very wide resource to interact with numbers and other data types to get our problem solved. During this interaction, one usually tends to run off ground and do silly yet serious mistakes that are most of the times unintentional. The mistakes can range from common declaration errors to some serious programming errors that cannot be recognized at the compile time but send the program crashing at runtime. This post is a series of some programming mistakes that can be identified as simple yet grave.

Common Errors and Mistakes in Object Oriented Programming C++

Written by Ali. Posted in C++


Hello everyone. This is our second post to the common C++ errors and mistakes series. Today, we’ll get to explore some more mistakes that many programmers make, rather unintentionally! These common errors would be in the object oriented paradigm as programmers use it more frequently and get used to it with more effort and hard work. 

Efficient Programming: Saving System Resources in Your Program

Written by Raza. Posted in C++

Efficient Programming Techniques

Programming is not a Big Deal. The Big Deal is Efficient Programming. Efficient programming is a very comprehensive term which includes writing a code which uses as less system resources as possible, is free from most of the errors  and is capable of handling all kinds of situations. I shall show you first a piece of code and then explain to you some of these aspects for writing an efficient code. Kindly follow the following piece of code. 

Overloading Error Free Assignment Operator

Written by Raza. Posted in C++

Overloading Assignment Operator in Object Oriented Paradigm

Assignment is not a simple task in object oriented programming. It may take you a day to trace out an error that is happening because of incorrect assignment, let alone fix it. In a post before, I dealt with some issues while assigning one object to another. Still there are some issues associated with it. So I shall write a code and explain to you its errors. Kindly Follow this piece of Code. 

Use of Explicit Constructor in Our Class

Written by Raza. Posted in C++

explicit constructor c++

C++ is a very powerful and fast language. One potential danger because of this is the ability of language to call methods and convert data into other types automatically without asking the programmer. So the programmer has an added responsibility of keeping an eye on the compiler and watch out for all such errors. One such common problem is the implicit conversion through a constructor. To avoid that, we use an explicit constructor in C++. Let us see a sample code for that and then I shall explain to you what actually happens.