Category Archives

std::get_temporary_buffer in C++

Get a block of temporary memory. In C++ STL library, there is a function get_temporary_buffer which is mostly used...

std::get_temporary_buffer in C++

Get a block of temporary memory. In C++ STL library, there is a function get_temporary_buffer which is mostly used...

delete and free() in C++

In C++, delete operator should only be used either for the pointers pointing to the memory allocated using new...

delete and free() in C++

In C++, delete operator should only be used either for the pointers pointing to the memory allocated using new...

malloc() vs new

Following are the differences between malloc() and operator new.: Calling Constructors: new calls constructors, while malloc() does not. In...

malloc() vs new

Following are the differences between malloc() and operator new.: Calling Constructors: new calls constructors, while malloc() does not. In...

“delete this” in C++

Ideally delete operator should not be used for this pointer. However, if used, then following points must be considered....

“delete this” in C++

Ideally delete operator should not be used for this pointer. However, if used, then following points must be considered....

Type of ‘this’ pointer in C++

In C++, this pointer is passed as a hidden argument to all non-static member function calls. The type of...

Type of ‘this’ pointer in C++

In C++, this pointer is passed as a hidden argument to all non-static member function calls. The type of...

‘this’ pointer in C++

To understand ‘this’ pointer, it is important to know how objects look at functions and data members of a...

‘this’ pointer in C++

To understand ‘this’ pointer, it is important to know how objects look at functions and data members of a...

Introduction of Smart Pointers in C++ and It’s Types

Things to learn in this article: Importance of pointer in C/C++. Problems with normal pointer. Why smart pointers introduce....

Introduction of Smart Pointers in C++ and It’s Types

Things to learn in this article: Importance of pointer in C/C++. Problems with normal pointer. Why smart pointers introduce....

When do we pass arguments by reference or pointer?

In C++, variables are passed by reference due to following reasons: 1) To modify local variables of the caller...

When do we pass arguments by reference or pointer?

In C++, variables are passed by reference due to following reasons: 1) To modify local variables of the caller...

Can references refer to invalid location in C++?

In C++, Reference variables are safer than pointers because reference variables must be initialized and they cannot be changed...

Can references refer to invalid location in C++?

In C++, Reference variables are safer than pointers because reference variables must be initialized and they cannot be changed...

Opaque Pointer

What is an opaque pointer? Opaque as the name suggests is something we can’t see through. e.g. wood is...

Opaque Pointer

What is an opaque pointer? Opaque as the name suggests is something we can’t see through. e.g. wood is...