Posts

Showing posts from September, 2020

Friend Function in C++

Image
Friend Function in C++ Welcome to C++ Programming. In this article, we will talk about friend Function and friend Class trying to understand what do they mean and why are they useful in C++ design process. These will be the module outline we will take examples of Matrix Vector Multiplication and Linked List, and finally will end with somenotes. As you know as usual the outline will be available on the left of your slide So, let us first introduce the basic notion of friend function. On the left you have the view of ordinary function. So the situation is like this, that I have a class myclass which as some private data, it has a constructor, and it has; I am sorry if just ignore this line. I have this function written outside of this class which is trying to do something with the class. What is it doing? It takes an object of the class by reference parameter call by reference, and then it tries to print the data element component of that objective. Now, what do we know, this is priva

Use Of CPP

Use Of CPP  In this article we will see some of the termsused with a programming language and then we are going to see the advantages of learning the c++ and then we will see where exactly this C++ programming language is used in the real world. First let's take a look at some of the terms used with the programming language. So the first term is the general purpose programming language. “A general purpose programming language is a language designed to be used for writing the softwares in our wide variety of application domains” In simple words when we say a programming language as a general purpose programming language it means that we can use that programming language to create different variety of applications. This c plus plus is also a general purpose programming language. It means you can use it for creating differentt ypes of softwares or the programs. Now the next thing is C++ is a middle level language. Programming languages is divided into three categories. lower level lan

Data Member and Static Keyword in C++

Image
Data Member and Static Keyword in C++ Hey, what's up guys. My name is Tariq and welcome back to my C++ series Today just coming at you with a quick article and we're going to talk about what static means in C++ so the static Keyword in C++ actually has two meanings depending on what the Context is one of those applies to when you use the static Keyword Outside of a class or a struct and the other is when you use static Inside a class or struct. Basically just to cut to the chase, static outside of class means that the linkage of that symbol that you declare to be static is going to be internal meaning. It's only going to be visible to that translation unit that you've defined it in.  Whereas a static variable inside a class or struct means that variable is actually going to share memory with all of the instances of the class meaning that basically across all instances that you create of that class or struct, there's only going to be one instance of that Static varia