Posts

Showing posts from May, 2014

How to create Stack using Link List in C++

How to create Stack using Link List #include <cstdlib> #include<iostream> using namespace std; class node {  public:     int data;     node* next; }; class Stack { public: Stack(int max) {     top = NULL;     maxnum = max;     count=0; } void push(int element) {     if(count == maxnum)             cout<<"stack is full";     else     {         node *newTop = new node;         if(top == NULL)         {                   newTop->data = element;             newTop->next = NULL;             top = newTop;             count++;         }         else         {   ...

How to Create Stack using Array

How to create Stack using Array #include <iostream> using namespace std; class Stack {       private:               int maxStackSize;               int stackTop;               int list[];       public:              Stack(int);              bool isEmptyStack();               bool isFullStack();               void push(int);               int top();               void pop(); }; Stack::Stack(int stacksize) {      maxStackSize=stacksize;      stackTop=0; } void Stack::push(int n) {      if(!isFullStack())      {     ...

How to create List BOX in XAML WPF

How to create List Box in XAML WPF In this article i am elaborating  the power of XAML to build a WPF application. In the below lines of code list box is created along with the list box items ; Window x:Class="WpfTutorialSamples.ListBox_control.ListBoxSample"         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"         Title="ListBoxSample" Height="120" Width="200">         <Grid Margin="10">                 <ListBox>                         <ListBoxItem>                                 <StackPanel Orientation="Horizontal">                        ...