We are committed to provide service 24 X 7

Deals, Shopping, Training, Tools

73
6.058.283,20

Cart

Quantity 19.800,00
Quantity 10.000,00
Quantity 116,00

Tag: Member

Iterating over a range of User Defined objects and calling member function using std::for_each

In this article we will discuss how to iterate over a container of user defined objects and call a member function on each of the iterating element.Suppose you have a vector of Employee class objects and you want to call a member function on each of the element in vector. [showads ad=inside_post] Let’s see how …

Iterating over a range of User Defined objects and calling member function using std::for_eachRead More

Using std::initializer_list in constructors to initialize member variables

In this article we will discuss how to use std::initializer_list<T> to initialize member variables. Suppose we have a class Point that has 3 member variables representing x, y & Z axis coordinates. It has a parameterized constructor too i.e. Advertisements class Point { int mX; int mY; int mZ; public: Point(int a, int b, int …

Using std::initializer_list in constructors to initialize member variablesRead More

C++11 : Start thread by member function with arguments

In this article we will discuss how to start a thread by a member function of class. Starting thread with non static member function Suppose we have a class Task, which has non static member function execute() i.e. Advertisements class Task { public: void execute(std::string command); }; Now we want to start a thread which …

C++11 : Start thread by member function with argumentsRead More

C++ : How to pass class member function to pthread_create() ?

POSIX Library provides a function pthread_create() to create threads i.e. #include <pthread.h> int pthread_create(pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine) (void *), void *arg); It accepts a function pointer as startup routine. This function accepts void * as argument and returns void *. In previous article we discussed how to use this API with global functions …

C++ : How to pass class member function to pthread_create() ?Read More

C++11 Lambda : How to capture member variables inside Lambda function

In this article we will discuss how to capture member variables from outer scope. Suppose we have a class OddCounter to keep the track of odd numbers read by the object. Inside its member function we are creating a lambda function and passing to a STL algorithm std::for_each. Advertisements Now this lambda function needs to capture …

C++11 Lambda : How to capture member variables inside Lambda functionRead More

Unary Operator Overloading in C++ using both member & Friend function

In this article we will discuss how to overload unary operators in c++ using both member and Friend function. What is an unary operator? An Unary operator is an operator that operates on a single operand and returns a new value. Advertisements Some of the unary operators are, ++ (Increment Operator) —   (Decrement operator) –    (Unary …

Unary Operator Overloading in C++ using both member & Friend functionRead More

C++11 : How to use std::thread as a member variable in class ?

In this article we will discuss how to use std::thread object as member variable inside class and its benefits. As std::thread objects are move only, therefore while designing a class that use std::thread as member variable, we need to take care that objects of this class should also be move only. Advertisements Creating Move-only class with …

C++11 : How to use std::thread as a member variable in class ?Read More

How to Become a Registered Member of NUPENG 2023

The Nigeria Union of Petroleum and Natural Gas Workers (NUPENG) is one of Nigeria’s largest and most influential trade unions. It is a union representing oil and gas workers since 1978. The Union provides its members various benefits and services, including protection of their rights and interests, improved working conditions, and access to training and …

How to Become a Registered Member of NUPENG 2023Read More

How to Become a Member of the Nigerian Society of Engineers

The Nigerian Society of Engineers (NSE) is a professional organization that serves as the umbrella body for all engineers in Nigeria. It provides a platform for engineers to network, share knowledge, and collaborate on projects. Becoming a member of the NSE is a significant achievement for any engineer, as it indicates their professional competence and …

How to Become a Member of the Nigerian Society of EngineersRead More

73
6.058.283,20

Cart

Quantity 19.800,00
Quantity 10.000,00
Quantity 116,00