Welcome to W3Courses
 Like Us on Facebook

C++

ADT List Source Code in C++

Following is the source code for an ADT List in C++

Share

ADT Queue Source Code in C++

Following is the source code for an ADT Queue in C++

Share

ADT Stack Source Code in C++

Following is the source code for an ADT Stack

Share

Balancing Brackets Source Code in C++

This programs opens a specified file and checks if brakets in that file are balanced or not, good for checking your code.

#include <iostream.h>
#include <fstream.h>
#include <ctype.h>
#include <stdlib.h>
#include <istream.h>

#define SIZE 500

Share

Toll Bridge Simulation Program Source Code in C++

Following is the source code for a Toll Bridge simulation program. Download the ADT Queue and save it as queue.h for the following code to work

Share

DeQueue Source Code in C++

Following is the DeQueue Source Code

#include <iostream.h>

Share

Infix to Postfix Source Code in C++

Following is the Infix to Postfix Source Code

#include <iostream.h>
#include <stdio.h>
#include <ctype.h>
typedef char data;

Share

Polynomial Addition Source Code in C++

The following code adds two polynomials

#include <iostream.h>

typedef struct node
{
 int coef;       // coeffecient
 char var;   //variable
 char exp;  //exponent sign
 int power; //power
 struct node *next;
}list_node;
typedef list_node *list;

Share

C++ Source Code for Creating a Tree

Source code for creating a Tree in C++

typedef struct node
{
 struct node *left;
 struct node *right;
 data item;
 node(data x)
 {
  item=x;
  left=0;
  right=0;
 }
}tree_node;
typedef tree_node *link;

void visit(link t)
{
 cout<<t->item;
}

Share