Posts Tagged ‘cprogramming’

Input Validation in C++

Written by Raza. Posted in C++

C++ contains different data types which include integer, character, float, double, arrays, etc. When we declare a variable of one data type, it can hold the data of its own type only. For example if we declare an integer type variable, we can input only an int value in it. Similar is the case with other types. But what would happen if we insist upon storing a character in an integer variable? So let us see.

Linked Lists using Structs

Written by Ali. Posted in C++

Hello world. In the last post we discussed at length about how to implement Linked List syntax and how to create one. Now we are to discuss how to begin a list and how to increase its size and how to keep a track of all the information in it.

Typecasting in C++

Written by Ali. Posted in C++

typecasting in c++

One of the most powerful features  C++ language offers is typecasting or type conversion. As we have seen the basics of most of the things, so before we move on, it is imperative that we know what typecasting really is. Type Casting is actually the conversion of one data type into another one. This feature is very powerful, and yet at the same moment, very dangerous, and is systems way of dealing with various data types. 

The arrow operator (->) in C++

Written by Hamza. Posted in C++

arrow operator c++

Let us now look at another interesting feature that pops up whenever dealing with classes in C++: the arrow operator. The arrow operator is used to access member functions within a class through a pointer. It is a very useful feature and makes object oriented programming in C++ a lot easier.

The Bubble Sort Algorithm

Written by Raza. Posted in C++

bubble sort

Two weeks ago, I explained to you a basic and easy sorting algorithm which was Selection Sort. Moving onwards, there is yet another basic algorithm by the name of Bubble Sort. It is known as Bubble sort because it brings the small values on the top of the list just like the light bubbles in water tend to come to the surface. Let us see how it works in depth.