When we talk about C++ programming, functions and pointers are very important. A function is basically a series of steps packaged into a nice unit. A pointer is an object that refers to a value stored in memory. So why not just combine them and create something really useful! Function pointer is exactly what you think … Continue reading What’s The Use Of Function Pointers In C++?
Tag: Functions
What Is Maximum Likelihood Estimation?
Let's say you are trying to estimate the height of a group of people somewhere. If the group is small enough, you can just measure all of them and be done with it. But in real life, the groups are pretty large and you cannot measure each and every person. So we end up having … Continue reading What Is Maximum Likelihood Estimation?
Using Hash Function In C++ For User-Defined Classes
If you are a programmer, you must have heard the term "hash function". In its most general form, a hash function projects a value from a set with many members to a value from a set with a fixed number of members. We basically convert the input into a different form by applying a transformation function. … Continue reading Using Hash Function In C++ For User-Defined Classes
How To Deal With Buffer Overflow
You must have encountered the word 'buffer' somewhere in your life. In everyday usage, buffer refers to something that acts as an intermediary between two things that don't get along. It's a shield which moderates the impact of one thing over the other. In the programming world, buffer refers to an area where we temporarily … Continue reading How To Deal With Buffer Overflow
What Is Metaprogramming? – Part 2/2
This is a continuation of my previous blog post on metaprogramming. In the previous post, we saw why we need metaprogramming. In this post, we will see what exactly this whole metaprogramming is all about. In the world of programming, the basic problem is that any general-purpose programming language is that it has its own … Continue reading What Is Metaprogramming? – Part 2/2
What Is Metaprogramming? – Part 1/2
You know how people talk about creating machines that can create more machines by themselves? Well, we already have machines that can create other machines. The concept of metaprogramming is just the technical side of it. Metaprogramming is the process of writing programs that can create other programs. It is one of the most underused programming … Continue reading What Is Metaprogramming? – Part 1/2
Dissecting The Riemann Zeta Function
The Riemann Zeta function is an extremely important function in mathematics and physics. It is intimately related to very deep results surrounding the prime numbers. Now why would we want to care about prime numbers? Well, the entire concept of web security is built around prime numbers. Most of the algorithms for banking security, cryptography, networking, … Continue reading Dissecting The Riemann Zeta Function
What Is A Singularity?
You must have heard the term "singularity" being used in various contexts. We see it in mathematics, physics, circuit design, mechanics, fluid dynamics, etc. The word "singular" means something that is extraordinary, unique, and strange. When we talk about singularity in mathematics, we usually refer to the uniqueness of mathematical objects. In particular, singularities refer … Continue reading What Is A Singularity?
ifdef and ifndef
If you have worked on a large code base before, you would have seen ifdef and ifndef statements a lot of times. In fact, it is a good practice to have them wherever necessary. It just adds more robustness to your code and if you are working in a team, it helps you avoid weird … Continue reading ifdef and ifndef
1 + 2 + 3 + 4 + 5 + …. = -1/12
Wait a minute, what? That looks very very wrong. You must be wondering if the title is some horrendous typo, right? Well, let me assure you that it's absolutely not! The sum of all natural numbers is equal to -1/12. This blog post is not just about mathematical trickery either. The equation in the title … Continue reading 1 + 2 + 3 + 4 + 5 + …. = -1/12