We are committed to provide service 24 X 7

Deals, Shopping, Training, Tools

Tag: with

Importance of Constructors while using User Defined Objects with std::vector

For User Defined classes if Copy Constructor and Assignment Operator are public then only one can insert it’s object in std::vector. This is because of two reasons, Advertisements All STL contains always stores the copy of inserted objects not the actual one. So, whenever we insert any element or object in    container then it’s …

Importance of Constructors while using User Defined Objects with std::vectorRead More

std::for_each Tutorial : Usage Details with Examples

The std::for_each() algorithm allows us to iterate over a given range of elements and perform operations over them.When to use std::for_each() ? Whenever you are iterating over the elements in a array or in a container and performing some different opeartions over them like accessing, modifying etc. Although you can achieve the same by typing …

std::for_each Tutorial : Usage Details with ExamplesRead More

Compiling C++ with Debug Symbols – gdb debugger Tutorial & Examples

In this article we will discuss how to build a C++ / C code in debug mode and how to start the debugging using gdb. Compile Code with Debug Symbols To debug a C or C++ application with gdb, it should be built in debug mode. So that debug symbols can be loaded and used …

Compiling C++ with Debug Symbols – gdb debugger Tutorial & ExamplesRead More

Debugging Multi-threading Applications with gdb debugger

In this article we will discuss how to debug multi-threading C++ application using gdb debugger. Compiling Multi-threaded Code using g++ with Debug Info To compile code in debug mode in gcc/g++ we need to use option “-g” . Also in Linux to compile multi threading we need to include pthread library option i.e. “-pthread”. Advertisements …

Debugging Multi-threading Applications with gdb debuggerRead More

How to attach gdb with running process

In this article we will discuss how to debug a running application. Many time we need to debug a running application by attching debugger with process at runtime. Advertisements [showads ad=inside_post]   Frequently Asked: Debugging Multi-threading Applications with gdb debugger How to attach gdb with running process Remote Debugging Tutorial using gdb Debugger To attach …

How to attach gdb with running processRead More

How to fill a vector with random numbers in C++

In this article we will discuss how to fill a std::vector with random numbers using std::generate. For this task we will use a STL algorithm std::generate i.e. Advertisements template<typename _FIter, typename _Generator> void generate(_FIter start, _FIter end, _Generator gen); It will update all the elements from range start to end -1 with values generated by …

How to fill a vector with random numbers in C++Read More

Using unordered_set with custom hasher and comparision function

In this article we will discuss how to use std::unordered_set custom hasher and comparision function. Unordered_set uses the Hash table implementation to provide the set functionality. To know more about Hash Table visit the following article, Advertisements What is Hashing and Hash Table? Whenever we insert an element in unordered_set two things happen i.e. Frequently Asked: std::unordered_set …

Using unordered_set with custom hasher and comparision functionRead More

How to use Unordered_set with User defined classes – Tutorial & Example

In this article we will discuss how to use std::unordered_set with User defined classes. std::unordered_set internally implements a hash table to store the elements. To know more about Hash Table visit the following article, What is Hashing and Hash Table? Advertisements std::unordered_set uses the hasher and comparison function. For primitive data types like int, string etc. default …

How to use Unordered_set with User defined classes – Tutorial & ExampleRead More

Overriding a method with different return type in Java

In this article we will discuss how to override a method in Java with different return type. The basic rule for overriding a method in Java is that the new overriding method in derived class should have same signature as of Base class’s method. But there is on exception to this rule i.e. Advertisements Overriding method …

Overriding a method with different return type in JavaRead More

Cart

Your Cart is Empty

Back To Shop