We are committed to provide service 24 X 7

Deals, Shopping, Training, Tools

Tag: example

C++ Set example and Tutorial – Part 1

In this article we will discuss how to use std::set with default sorting criteria. std::set – Introduction std::set is an associative container and header that need to be include for it is,#include<set> Advertisements Benefits and Features of std::set: It’s doesn’t allow duplicate elements i.e. it only contains unique elements. Std::set can contain element of any …

C++ Set example and Tutorial – Part 1Read More

c++ std::set example and tutorial with external Sorting criteria | Comparator

In this article we will see how to use external Sorting Criteria i.e. Comparator in std::set. Suppose our class is Message that contains three properties i.e. • Member content • Sending User Name • Receiving User Name Advertisements Requirement: we want to keep only single message sent by each user i.e. only one sent message …

c++ std::set example and tutorial with external Sorting criteria | ComparatorRead More

C++ std::set example and tutorial with user defined classes

In this article we will see how to use std::set with user defined classes. If you want to use std::set with user defined classes and use default sorting criteria then overload operator < in the class. Advertisements For example, Suppose our class is Message that contains three properties i.e. • Member content • Sending User …

C++ std::set example and tutorial with user defined classesRead More

C++ std::vector example and why should I use std::vector?

Vector is a template based container that behaves just like a Dynamic Array. It can expands its memory at run time and always store elements in contiguous memory location just like Array. Advertisements We can store any type of element in vector by specifying the type as template argument. [showads ad=inside_post] Frequently Asked: Be careful …

C++ std::vector example and why should I use std::vector?Read More

c++ std::vector and Iterator Invalidation example

In this article we will discuss the iterator invalidation with respect to std::vector in C++. What is Iterator Invalidation? An Iterator becomes invalidate when the container it points to changes its shape internally i.e. move elements from one location to another and the initial iterator still points to old invalid location. Advertisements Iterator invalidation in …

c++ std::vector and Iterator Invalidation exampleRead More

C++ std::list Tutorial, Example and Usage Details

In this article we will discuss std::list usage details. What is std::list ? std::list is sequential STL container that is internally implemented as doubly linked list. i.e. every element in the list is stored at a seperate memory location i.e. called node and it also contains a pointer to the previous and next node. Advertisements …

C++ std::list Tutorial, Example and Usage DetailsRead More

STL Algorithm – std::sort Tutorial and Example

In this article we will discuss STL Algorithm std::sort algorithm. std::sort is a STL Algorithm which provides the functionality of sorting a given range of elements. To use std::sort we need to pass start and end of range in it as an argument i.e. Advertisements std::sort (<START OF RANGE> , <END OF RANGE>); For example, we …

STL Algorithm – std::sort Tutorial and ExampleRead More

Process Identification in Linux – Tutorial & Example

In this article we will discuss, how to differentiate and identify each process in linux. Process ID Each process in Linux has a unique id and has a parent.  We can get the process id of a running process and its parent’s process id using following functions, Advertisements pid_t getpid() pid_t getppid() File to be …

Process Identification in Linux – Tutorial & ExampleRead More

4
77.859,60