Posts

Showing posts with the label eclipse-cdt

OOMPL :Weather report

//============================================================================ // Name        : weather_rep.cpp // Author      : Parashar // Version     : // Copyright   : Do not try this at home :p // Description : Hello World in C++, Ansi-style //============================================================================ #include <iostream> using namespace std; class weather { public:     int day,h_temp,l_temp; public:     weather();     void input(int);     void output();     //void average(); }; weather::weather() {     day=99;     h_temp=999;     l_temp=-999; } void weather::input(int counter) {     cout<<"enter high temperature"<<endl;     cin>>h_temp;     cout<<"enter low temperature"<<endl; ...

DSPS: CDLL (final update with output)

//============================================================================ // Name        : cdll.cpp // Author      : Parashar // Version     : // Copyright   : Do not try this at home ;P // Description : Hello World in C++, Ansi-style //============================================================================ #include <iostream> using namespace std; class cdll     {       public:            struct node              {                int data;                struct node *next,*prev;              }*head;       public: ...

C++: Binary search tree(bst)

//============================================================================ // Name        : Tree.cpp // Author      : Parashar // Version     : 1.00 // Copyright   : Do not try this at home ;p // Description : Hello World in C++, Ansi-style //============================================================================ #include <iostream> using namespace std; class node { public:     int data;     node *left;     node *right; }; class tree { public:     node *root,*n; public:     tree();     void create();     void insert(node*,node*);     void inorder(node*);     void preorder(node*);     void postorder(node*);     void search(node*); }; tree::tree() {     root=NULL; } void...