Finding Length of a string in C++

Sometimes we have strings entered by the user and we need to find out the length of a string or size of that length of a string to be used further....

Overloading Addition operator in C++

Here we have overloaded addition operator for a specific class or one can say addition operator is overloaded for a self-defined data type in C++. The code is: ...

Control structures in C++

Control structures in C++ also called the decision makers. In C++ We have control structures which are helpful in programs which needs a little bit concept of decision making between different...

Bank Management System Project in C++

The Given Source Code provides you A bank management system in C++. The Given management system is implemented in C++ using File Handling for Data storage. Following are the features of...

Program for Palindrome in C++

Palindrome is a word that reads the same forward or backward. Now how can we check a string that it is a palindrome or not? We can do it by using...

Drawing a Triangle in Console window

Here is a C++ code containing nested loops which is able of drawing a triangle in your console window.We can use loops easily to draw many structures in our console window,...

C++ inheritance

lets have a look at the below example: // C++ inheritance #include<iostream> using namespace std;   class Point { protected:     int x,y; public:     Point(int ,int);     void display(void); };   Point::Point(int a,int b) {     x=a;     y=b; }   void Point::display(void) {      cout<<"point = "; }   class Circle : public Point {     double radius; public:     Circle(int ,int ,double );     void display(void); };   Circle::Circle(int a,int b,double c):Point(a,b) {     radius = c; }   void Circle :: display(void) {     Point::display();     cout<<" and radius = "<<radius; }   int main(void) {     Circle c(3,4,2.5);     c.display();     cout<<endl;     return 0; } In the above we took a class “point” in which we defined its attributes (its data members and member functions), then we inherited(derived) the...

Overloading steam insertion and extraction operators in C++

For putting data into the stream and getting data from the stream, the stream insertion and extraction operators are used, Now these operators are already defined for defined datatypes in C++,...

Generate Random Numbers in C++

We generate random numbers in C++ because it is used mostly in games and other automatic stuff. To Generate random numbers  we need some ready  made libraries, we use the library...

datatypes in C++

Just like other languages, all variables have a datatypes in C++  ,name, size and value. The detailed info of the datatypes of C++ is: Type Name Bytes Other Names Range of...