#include<iostream.h>
#include<conio.h>
#include<process.h>
#define SIZE 10
int queue[SIZE];
int front=-1,rear=-1;
void insert();
void del();
void display();
void main()
{
int ch;
do
{
clrscr();
cout<<"\nMAIN MENU."<<endl;
cout<<"\n1. Insert."<<endl;
cout<<"\n2. Delete."<<endl;
cout<<"\n3. Display."<<endl;
cout<<"\n4 Exit.\n"<<endl;
cout<<"\nEnter your choice.(1-4) : ";
cin>>ch;
switch(ch)
{
case 1 : insert();
break;
case 2 : del();
break;
case 3 : display();
break;
case 4 : exit(0);
default : cout<<"\nInvalid Choice.";
}
getch();
}
while(1);
}
void insert()
{
int val;
if(rear==SIZE-1)
{
cout<<"OVERFLOW."<<endl;
return;
}
cout<<"\nEnter the value : ";
cin>>val;
if(rear==front)
{
rear++;
front++;
queue[rear]=val;
}
else
{
rear++;
queue[rear]=val;
}
}
void del()
{
if(front==-1)
{
cout<<"\nQueue is empty.";
return;
}
if(front==rear)
front=rear=-1;
else
front++;
}
void display()
{
int front_vir=rear;
if(front==-1)
{
cout<<"\nQueue is empty.\n";
return;
}
while(front_vir<=rear)
{
cout<<queue[front_vir]<< " ";
front_vir++;
}
}
The Express edition of C++ does not require a serial code. It is free.
No such code exists for MSEB Bill Generation in C++.
0-black.2-green
Generic programming means that the code is generic enough that it compile on any C++ implementation. That is, it has no platform-specific code.
G++ is the Gnu compiler's extension for C++. It is not a different language. It simply allows you to use the GCC compiler to write C++ code.
Sometimes, it is. Some implementations compile C++ code into C code, and then compile the C code.
It is used to distinguish between the C or C++
All C++ source code is is a text file with the .cpp extension. So if you save your code as *****.cpp then it is automatically C++ source code.
The Express edition of C++ does not require a serial code. It is free.
yihuy
#include <libraryname>
Code, compile, link, run.
Turbo C compiles c source. turbo c++ compiles c++ source code.
C++ is a language code for computer and lapatops which is used in programming but C is a grade so they are different.
A good open source IDE for C++ would be Code::Blocks or Notepad++.
No such code exists for MSEB Bill Generation in C++.
Something like this: