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

The std::unique_ptr is basically a template smart pointer class.┬áIt is smart about cleaning up the allocated memory. Template class means this can work with different data types. We have to provide the actual pointer in time of constructing the object. In the desctuctor, the pointer is freed. Another thing is, the usual pointer operator like … Continue reading “What is std::unique_ptr? How to Use std::unique_ptr?”

How to do Asynchronous Operation using boost::asio?

Boost::asio was initially designed for accomplishing time-consuming networking I/O (Input/Output) operations in asynchronous way. I/O operations over network usually takes some time to complete. If you call a function that does I/O operation over network, the calling thread will block until the I/O operation is complete. This is a problem in many situations. For example, … Continue reading “How to do Asynchronous Operation using boost::asio?”