Operator Functions in C++ :
You can use operators not only to perform operations by passing variables rather using class deirectly , Here's How : #include "iostream" class Arithmetic{ public: int a; Arithmetic(const int a) : a(a) {}; int Add(cons...
Search for a command to run...
You can use operators not only to perform operations by passing variables rather using class deirectly , Here's How : #include "iostream" class Arithmetic{ public: int a; Arithmetic(const int a) : a(a) {}; int Add(cons...
Like pointers in C ( *int , *char ) we can use pointers to a function . Here's a sample of Function Pointer :: #include "iostream" void Sample(){ std::cout << " This is sample function call ." << std::endl; }; int main(){ auto function = Samp...
C++ allows us to use inline functions like we use in Python . Let's see the expression of Lambda Functions : auto lambdas = [ capture clause ] (parameters) -> return-type { definition of method ... } Implementation of Simple Lambda Function:...
Let's know what is Singletons : Sometimes we need to have only one instance of our class for example a single DB connection shared by multiple objects as creating a separate DB connection for every object may be costly. Similarly, there can be a sing...
Let's first have an idea about what is Generics . A generic function is a function that is declared with type parameters. When called, actual types are used instead of the type parameters. In C++ Generics are implemented using template . Generics ca...