Static Members in C++ Template Class

We generally use static members in C++ class to maintain something that is not object specific, rather class specific. For example, if we want to maintain a counter about how many objects are created from a class, we keep a static counter in the class. In the class constructor, we increment the counter and we … Continue reading “Static Members in C++ Template Class”

How to find position of a digit in a number in C programming?

This program will find out the position of a digit in a number. If the digits exists in multiple positions, this program will find all positions. For example digit 4 is present in 41234253 at 4th and 8th positions from left. He is the Output: Logic is simple: in every iteration we do modulo operation … Continue reading “How to find position of a digit in a number in C programming?”

What is std::unique_ptr? How to Use std::unique_ptr?

std::unique_ptr is a smart pointer that owns and manages another object through pointer. std::unique_ptr has unique ownership of the object. That means only one std::unique_ptr can have the ownership of the actual object. We can not assign a std::unique_ptr object to another smart pointer. std::unique_ptr disposes the managed object when the unique_ptr goes out of … Continue reading “What is std::unique_ptr? How to Use std::unique_ptr?”

How to do Asynchronous Operations using boost::asio?

Boost::asio is primarily designed for accomplishing time-consuming networking I/O (Input/Output) operations in an asynchronous way. I/O operations over network usually takes considerable time to complete. In synchronous mode, if you call a function that does I/O operation over network, the calling thread blocks until the I/O operation is complete. This is not acceptable in many … Continue reading “How to do Asynchronous Operations using boost::asio?”

History of Programming Languages

Programming languages are complex even today at least to many programmers like me. But once you know the history of programming languages, you’ll definitely change your mind. Machine Language You might already know the computers understand only two symbols, zero (0) and one (1). Everything in computer is represented in form of zeros and ones. … Continue reading “History of Programming Languages”

0
0
0
0
0
0