-->



C plus plus assignment help service

Looking for a website for IT solutions?

Leave a Comment
Many of the times we think there should be a website which have different types of solutions. Why?
For example we like a blog/website due to
  • Its content
  • Author writing tone
  • Design
  • To the point content no long stories
And we get addicted to this web or blog. Let a website contains solutions about frontend development only. Its author is a gem and explains very well for you and you get your solutions quickly. 
At the same time there is another website which has backend programming solutions but you get its explanation after digging out more and more. So you will like first author have backend solutions too?
Yes here is the website SolutionSpirit.com which does this it has vast covering solutions categories.


programming solutions all in on site

If you are an android developer mush check their android solutions category. Like scrolling recycler view making items shuffle incorrectly is to the point explained.

After reading their about us page it feels they are fully dedicated to provide the best solutions in super easy way and their content proves that too. 

Design
Its simple clean and focus on the content no extra design to disturb your attention towards content. And currently they don't have ads on their site but a donate button. They should have fewer ads to keep there sources up and running hope they will. 

How about quality of solutions?
Well the solutions I found on their site is worth for the beginners and for the experience person as well. There is an example I my self working on android faced a problem about recycle view after too many hours of searching here and there I found a solution but not efficient in the above link the described the best way of the problem by overriding methods of adapter.

As a whole they did an excellent job by making live a site like solutionSpirit.com I wish them best of luck and keep solving the problems of others. 


Read More...

Do My Assignment for Me Requests Picked up & Dealt with Ease!

Leave a Comment




A perfectly matching programming assignment writer with a great track record in a particular area is assigned to check, research and write your project, regardless the complexity level and the deadline.


When working with a professional programming assignments guru at AssignCode.com, you’ve got an opportunity to hand in a top quality report or a term paper in a timely manner! Online procedure requires very little payment and effort from your side. 

When you make a choice to collaborate with the programming assignment helper online, you do the right thing towards academic progress and your career in general. Working hard on every other custom writing assignment in the field, the experts of the company save numerous hours of researching, writing and editing to high school, college and university students. 

Entrust your project on JAVA, app development, Python, or any other subject in the computer science to the experienced and qualified academic solutions providers at AssignCode.com and enjoy the range of options offered for both new and regular clients. Stunning performance with every ‘Do my assignment for me, please’ is a must for a moderate price.
Pay Someone to Do My Assignment Requests of Any Level Are Welcome!
The process of ordering a programming homework assignment from the websites like AssignCode.com is quite simple and quick. To do this, you have to fill in an online form with the ‘Please, do my assignment for me’ request. 

To get the best online assistance possible, you have to explain, describe and give all additional comments on the key points of the college programming project. Thus, the representative of the website will have a complete understanding of your task, as well as its specifications. 

At the point, the customer of the companies like AssignCode.com should be exceptionally careful. The thing is that the more precise and accurate the project instructions are – the better-researched custom written assignment you’re going to find in your inbox.


Here are the central features of the programming writing service available at AssignCode.com:

  • US Specialists 
When you provide the company with your ‘I’d like to pay someone to do my assignment, do you have an expert available at the moment?’ request, you’re provided with an opportunity to co-work with someone, who has the relevant experience to solve the problems of your academic level.

The websites like AssignCode.com, where professional programming assistance is offered for relatively cheap prices, recruit native English speakers, who have proven experience needed to accomplish a good looking paper free from any sort of errors. Every candidate is properly evaluated before becoming a part of the company staff.


  • Complete Confidentiality 
Privacy of every client approaching the company for help is the number one priority for AssignCode.com. When you place your ‘I need a competent programming assignment problem solver, who can get my MBA paper done for money’ order, you’re provided with the services based on the solid principles of non-disclosure and privacy.
  • 100% Unique Work
Every single project that you buy from the writers of Assign Code company is free from plagiarism and includes all the answers to your particular question.

Every programming paper on JAVA, app development or any other issue is custom written from scratch, so you won’t find the project you purchase from AssignCode.com anywhere else on the web.




  • Unique Approach 
AssignCode.com is a custom writing company, where a team of trusted people know exactly how to write the paper that you need. The experts of the sites like the one mentioned above have fully dedicated themselves to provide unparalleled experience to every client, who stands behind the ‘I’m assigned with the programming writing task. Will you be there to help me somehow?’ order.
Read More...

power function code using pointers c++

Leave a Comment
Write a program which calculates the power of a number using pointers. User will input two numbers and program will calculate power. First number will be base and second number will be the power.

This code explains following C++ Concepts

  • Functions with same arguments but different return data type
  • How to use pointers
  • Using pointers value to perform an arithmetic operation

program prototypes
power function pointers example c++
functions prototypes
Program has been tested on codeblocks c++ complier.
see also: pointers multiplication example, pointers addtion example code

program source code:


#include <iostream>
using namespace std;


int Power(int *, int *);
float Power1(int *, int *);
double Power2(int *, int *);

int main()

{
    int a,b;

 cout<<"Enter 1st Value:";
 cin>>a;

 cout<<"Enter 2nd Value:";
 cin>>b;

 cout<<endl <<endl;

 cout<<"...............Power.........." <<endl <<endl;

 cout<<"The Power of these numbers is:"<<Power(&a,&b)<<endl;
 cout<<"The Power of these numbers is:"<<Power1(&a,&b)<<endl;
 cout<<"The Power of these numbers is:"<<Power2(&a,&b)<<endl;

 cout<<endl <<endl;

 return 0;

}


int Power(int *x, int *y)

{
 int P=1;
 for(int i=0;i<*y;i++)
 {
  P=(P * *x);
 }
 return P;
}

float Power1(int *x, int *y)

{
 float P=1;
 for(int i=0;i<*y;i++)
 {
  P=(P * *x);
 }
 return P;
}

double Power2(int *x, int *y)

{
 double P=1;
 for(int i=0;i<*y;i++)
 {
   P=(P * *x);
 }
 return P;
}

program input output
power function code example pointers c++

This program will help to clear the concept of functions with different return types. It shows the output of 3 functions having same arguments but different return types.
Beside this it shows how to use the value with pointers.
find more example here: c++ examples code
Read More...

pointer multiplication c++ example source code

Leave a Comment
Write a program to multiply two numbers using pointers. Make function for multiplication take input from user. There should be three functions each should return a different data type int, float and double.

Prototypes for functions are
simple pointer multiplication example c++ code



This program has been tested on c++ codeblocks IDE
C++ source code:
see also: pointer addition example source code

#include <iostream>
using namespace std;

int Mult(int *, int *);
float Mult1(int *, int *);
double Mult2(int *, int *);

int main(){

    int a,b;

 cout<<"Enter 1st Value:";
 cin>>a;
 cout<<"Enter 2nd Value:";
 cin>>b;
 cout<<"...............Multiplication.........." <<endl <<endl;

 cout<<"The integer Multiplication of these numbers is:"<<Mult(&a,&b)<<endl;
 cout<<"zThe float Multiplication of these numbers is:"<<Mult1(&a,&b)<<endl;
 cout<<"The double Multiplication of these numbers is:"<<Mult2(&a,&b)<<endl;

 cout<<endl <<endl;
 return 0;
}

int Mult(int *x, int *y){
 int Prod;
 Prod=(*x * *y);
 return Prod;
}

float Mult1(int *x, int *y){
 float Prod;
 Prod=(*x * *y);
 return Prod;
}

double Mult2(int *x, int *y){
 double Prod;
 Prod=(*x * *y);
 return Prod;
}

Program input output
c++ simple pointer multiplication example source code

If you do not want to write prototypes just add three methods above main method. 

Suggestion number 1
I suggest first remove the prototypes than examine the errors compiler (IDE) will show this will help to understand errors also. 

Suggestion number 2
We have 3 methods with all methods take two integers as arguments. Try by changing argument data types and return types and and examine the different cases in which your code is working and not working. 

Always do experiments with code for fast learning. Each and every time you face an error you learn. Good luck
Find more: c++ programming simple examples

Read More...

c++ pointer addition example

Leave a Comment
Write a program which calculates addition of two numbers using pointers. program has three functions which receives two pointers reference. Three functions returns int, float and double sum of numbers. This c++ tutorial use the following concepts.


  • pointers in c++
  • functions
  • passing reference to function

This code has been tested on codeblocks c++ compiler

C++ source code
#include <iostream>
using namespace std;

int Sum(int *, int *);
float Sum1(int *,int *);
double Sum2(int *, int *);


int main()

{
    int a,b;


 cout<<"Enter 1st Value:";
 cin>>a;

 cout<<"Enter 2nd Value:";
 cin>>b;

    cout<<"...............ADDITION.............." <<endl <<endl;

 cout<<"The integer sum of these numbers is:"<<Sum(&a,&b)<<endl;
 cout<<"The float sum of these numbers is:"<<Sum1(&a,&b)<<endl;
 cout<<"The double sum of these numbers is:"<<Sum2(&a,&b)<<endl;

 cout<<endl <<endl;

 cout<<endl <<endl;


 return 0;

}


int Sum(int *x, int *y )

{
 int sum;
 sum=(*x + *y);
 return sum;
}

float Sum1(int *x,int *y )

{
 float sum;
 sum=(*x + *y);
 return sum;
}

double Sum2(int *x, int *y )
{
 double sum;
 sum=(*x + *y);
 return sum;

}



Input output of code
c++ pointer example to add two numbers

addition functions
two number additions using pointers c++
Find more here: c++ examples with output
github source
Read More...

c++ program to count spaces in a string

Leave a Comment
Write a program which calculate number of spaces in a string using pointer. Make a separate function which takes a pointer and using for loop it calculates all spaces.
This example covers the concept of 
  • pointers in c++
  • functions
  • loop
C++ source code

#include <iostream>
using namespace std;
void Calculate_Spaces_alpha(char *);
int main()
{
 char string [] = "This string contains four spaces";
 cout <<"String is "<<"\n%----------------------%\n" << string << endl;
 char *str = string;
 Calculate_Spaces_alpha(str);
 return 0;
}

void Calculate_Spaces_alpha(char *ptr)
{
 int spaces = 0;
 int characters = 0;
 for ( ; ; ptr++)
 {
  if (*ptr == ' ')
   spaces++;

  if (*ptr != '\0')
   characters++;
  else
   break;
 }
 cout << "\nIn the String: "<< endl << "Characters:  "<< characters << endl <<"Spaces:  " << spaces << endl;
}


This code has been tested on c++ Code blocks compiler
code view


see more examples here: C++ Example Source Codes
Read More...

Experts to rely on when you stuck with programming

Leave a Comment
Since nowadays there are plenty of high-paid career opportunities in the IT and Software Engineering spheres worldwide, many young people are committed to gaining a degree in Computer Science. However, entering a college or university, they can hardly imagine how complicated and time-consuming their homework may appear over time. And when it comes to combining that homework with assignments in other subjects, students quickly get tired, frustrated, and unwilling to do any kind of work. As a result, they either skip some tasks and burn the midnight oil doing the most important ones or turn to help to put a part of their burden on somebody else’s shoulders. Fortunately or not, sometimes the latter helps the most.

Service to use when programming becomes a headache

One of the number of services throughout the internet to provide the students with homework assistance is Assignment Expert which has been strengthening its position in the market for 8 years so far, claiming to have delivered more than 51k tasks. It specializes in Computer Science, Programming, Mathematics, Engineering, Economics and some others and, what’s more, boasts to have 900 qualified and individually tested experts in all disciplines presented on their website, so every task has high chance to be accomplished. 

When the experts accept the task, they promise the customer to accomplish the assignment successfully with a 97% guarantee. Only rare cases show that sometimes misunderstandings may happen during the task processing, but most of them can be easily solved with deposits or compensations. Such high percent of excellently prepared projects is gained due to another special thing about the service that is its quality control team. This is a group of in-office experts and members of the support team who control the actual process of doing any kind of homework 24/7 and keep in touch with the customers online all the time. 
The success of the company also lies in a fair system of task evaluation where the price of every task is budget-friendly and depends on the thorough examination of the factors like the level of difficulty, volume, and deadline set in the requirements by the customer. 

Computer Science as a major branch of Assignment Expert 

Programming is one of the most popular АЕ’s specializations; the team of developers work with a large number of languages, technologies and Integrated Development Environments that are used in studying of Programming and creation of business offers. C/C++, Java, and Python branches embrace all kinds of assignments from the easiest basic tasks to big projects like, for example, implementation of PageRank algorithm, grid and parallel computing, FTP clients/servers, etc. A wide range of tasks deal with databases, web design and web development.

Programmers engaged in C and C++ often perform the tasks that presuppose implementation of various algorithms while working with data structures and numerical methods. It is the use of abstract data types (like stack or queue), trees, graph algorithms, genetic algorithms and many more. A bunch of tasks go to developing and coding the hierarchy of classes for console games, modeling of the work of the stocks, airports and office applications. For the works to receive the good grades, it's important to follow the main quality standards, namely modularity, standards of code structuring and variables naming, avoidance of memory leaks and often passing tests. The experts of Assignment Expert test the code with the help of Visual Studio и Valgrind to make sure all results are correct. Besides, clear comments and explanations that follow the code help the customers to better and quicker grasp the topic and feel confident during classes.

The service constantly checks the clients’ feedback in order to always be able to support, fix, and improve the quality of its work. First year students, for instance, always pay attention to the accompanying documentation (the process of project building, screenshots, purpose of classes and functions, description of complex algorithms from the point of view of the algorithms’ developer) and they are often grateful for the provided material on different websites like Sitejabber.com, “They provided screenshots of it working, even how to compile it. I am simply amazed”. From the reviews, it’s clear that the experts communicate with the customer until the grade is given, “My experience with them has been absolutely top notch. Starting from customer service to getting the assignment done and the follow up support”. The student, therefore, can always be sure in the best result, "I send back my assignment a lot of times. In every time, I find very good cooperation from expert and customer services." 

It can’t be argued that the number of successful homework tasks is the result of hard work of the professionals of Assignment Expert, independent quality control and experience they got over the years.
Read More...

c++ program for complex numbers using class

Leave a Comment
C++ class for addition, subtraction, multiplication and division for complex numbers. Class has four functions to perform arithmetic operations. It takes two complex numbers input from user real and imaginary part separately. Double data type is used to perform all operations. Code tested using c++ CodeBlocks IDE.


#include <iostream>
using namespace std;

//**********COMPLEX CLASS************************
class Complex{

private:
 double real,imag;

public:
 Complex(){
  real=imag=0;
 }
 ///////////////////////////////////////////////////
 Complex(double r){
  real=r;
  imag=0;
 }
    ///////////////////////////////////////////////////
 Complex(double r, double i){
  real=r;
  imag=i;
 }
    ///////////////////////////////////////////////////
 Complex(Complex &obj){
  real=obj.real;
  imag=obj.imag;
 }
    ///////////////////////////////////////////////////
 Complex add(Complex c){
        Complex Add;
  Add.real = real + c.real;
  Add.imag = imag + c.imag;
        return Add;
 }
    ///////////////////////////////////////////////////
 Complex sub(Complex c){
  Complex Sub;
  Sub.real = real - c.real;
  Sub.imag = imag - c.imag;
  return Sub;
 }
    ///////////////////////////////////////////////////
 Complex mult(Complex c){
        Complex Mult;
  Mult.real = real*c.real - imag*c.imag;
  Mult.imag = real*c.imag - c.real*imag;
  return Mult;
 }
    ///////////////////////////////////////////////////
 Complex div(Complex c){
  Complex Div;
  Div.real = (real*c.real + imag*c.imag)/(c.real*c.real + c.imag*c.imag);
  Div.imag = (imag*c.real + real*c.imag)/(c.real*c.real + c.imag*c.imag);
  return Div;
 }
    ///////////////////////////////////////////////////
 void print(){
        cout<<real<<"+"<<imag<<"i"<<endl<<endl;
 }
    ///////////////////////////////////////////////////
 double getReal() const{
  return real;
 }
    ///////////////////////////////////////////////////
 double getImag() const{
  return imag;
 }
    ///////////////////////////////////////////////////
 void setReal(double re){
  real = re;

 }
    ///////////////////////////////////////////////////
 void setImag(double im){
        imag = im;
 }
 ///////////////////////////////////////////////////

};

//***************MAIN***************************
int main()
{
 double real1,imag1,real2,imag2;

 cout<<"Enter the Real  part of First Number: ";
    cin>>real1;
 cout<<"Enter the imaginary  part of First Number: ";
 cin>>imag1;
    Complex obj1(real1,imag1);
 obj1.print();

 cout<<"Enter the Real part of Second Number: ";
 cin>>real2;
 cout<<"Enter the Imaginary part of second number: ";
    cin>>imag2;
    Complex obj2(real2,imag2);
 obj2.print();

 Complex c;
 c = obj1.add(obj2);
 cout<<"Addition is : ("<<c.getReal()<<")+("<<c.getImag()<<")i"<<endl;
 c= obj1.sub(obj2);
 cout<<endl<<"Subtraction is : ("<<c.getReal()<<")+("<<c.getImag()<<")i"<<endl;

 c= obj1.mult(obj2);
 cout<<endl<<"Multiplication is : ("<<c.getReal()<<")+("<<c.getImag()<<")i"<<endl;

 c= obj1.div(obj2);
 cout<<endl<<"Division result  is : ("<<c.getReal()<<")+("<<c.getImag()<<")i"<<endl;
 return 0;
}



program input output
complex number class example c++ code
program output




Program images
complex number c++ code
complex numbers
complex number c++ program
c++ class complex number code


find more examples here C++ Examples

Read More...

Queue c++ project source code using array, linked list and doubly/circular linked list

2 comments
Download C++ project source code for queue implementation using array, linked list and circular linked list.
Each data structure has its own functions. User can select from menu for data type selection to build queue.
All data structures has basic queue functions. En-queue, De-queue, show front, show queue etc.

Project source code. It has been tested on Code Blocks C++ IDE.

#include<iostream>
#include<windows.h>

using namespace std;
// Queue for array
void enqueue(int);
void dequeue();
int isempty();
int isfull();
void array_call();
void show();
const int total = 2;
int marks[total];
int rear = -1; //rear mean last element of queue
int front = 0;//front mean first element of queue
int counter = 0;

// Queue for Linklist
struct list
{
 int data;
 list * next;
};
list *f, *c, *p, *temp;
int linklist_counter = 0;
void linklist_insert();
void linklist_call();
void linklist_dequeu();
void linklist_show();
void linklist_front();
int linklist_isempty();

//Queue for Double Linklist
struct dlist {
 dlist * prev;
 int data;
 dlist * next;
};
dlist *first, *current, *previos, *tamp;
int dlinklist_counter = 0;
void dlinklist_insert();
void dlinklist_call();
void dlinklist_dequeu();
void dlinklist_show();
void dlinklist_front();

int main()
{
zee:
 system("cls");
 int i;
 cout << "\t\t\t\t Welcome in Queue  \n 1- Array \n 2- Link List \n 3- Double Link List \n 4- EXIT \n";
 cin >> i;

 switch (i)
 {
 case 1:
  array_call();
  goto zee;
 case 2:
  linklist_call();
  goto zee;
 case 3:

  dlinklist_call();
  goto zee;
 case 4:
  break;
 default:
  cout << " You enter invalid number PLZ Select again \n";
  system("pause");
  goto zee;
 }
 return 0;
}

// function of Array
void array_call()
{
start:
 system("cls");
 cout << "\t\t\t\t Welcome in Queue with Array";
 int input;
 cout << "\n 1- Enqueu \n 2- Dequeu \n 3- Front\n 4- Show all data \n 5- Exit from Queue in Array \n";
 cin >> input;
 switch (input)
 {
 case 1:
 {int z; z = isfull();
 if (z)
 {
  int y;//y is input whiich you insert in queue
  cout << "Enter you number";
  cin >> y;
  enqueue(y);
  cout << " Number entered \n";
  system("pause");
 }
 else
 {
  cout << "Your Queue is full \n";
  system("pause");
 }
 goto start;
 break;
 }

 case 2:
 { int a; a = isempty();
 if (a)
 {
  dequeue();
  cout << "Number deleted \n ";
  system("pause");
 }
 else
 {
  cout << "Your Queue is Empty \n";
  system("pause");
 }
 goto start;
 break;
 }

 case 3:
 {
  int a; a = isempty();
  if (a)
   cout << "\n Your front value is " << marks[front]<<endl;
  else
   cout << "Your Queue is Empty"<<endl;
  system("pause");
  goto start;
  break;
 }

 case 4:
 {
  int a; a = isempty();
  if (a)
   show();
  else
   cout << "Your Queue is Empty"<<endl;
  system(" pause");
  goto start;
 }

 case 5:
 {
  break;
 }
 default:
  cout << "\n You enter invalid Number \n";
  system("pause");
  goto start;
  break;
 }

}
void enqueue(int x)
{
 rear = (rear + 1) % total;
 marks[rear] = x;
 counter = counter + 1;
}
void dequeue()
{
 front = (front + 1) % total;
 counter = counter - 1;
}
int isempty()
{
 return(counter != 0);
}
int isfull()
{
 return(counter != total);
}
void show()
{
 int j = front;
 for (int i = 0; i < counter; i++)
 {

  cout << " " << marks[j];
  j++;
  j = j%total;
 }
}

//function of LINK LIST
void linklist_call()
{
linklist_start:
 system("cls");
 cout << "\t\t\t\t Welcome in linklist Queue";
 int input;
 cout << "\n 1- Enqueu \n 2- Dequeu \n 3- show list \n 4- Front\n 5- Exit\n";
 cin >> input;
 switch (input)
 {
 case 1:
  linklist_insert();
  cout << " Number entered \n";
  system("pause");
  goto linklist_start;
 case 2:
  linklist_dequeu();
  goto linklist_start;
 case 3:
  linklist_show();
  goto linklist_start;
 case 4:
  linklist_front();
  goto linklist_start;
 case 5:
  break;
 default:
  cout << " You enter invalid number ";
  system("pause");
  goto linklist_start;
 }
}
void linklist_insert()
{
 c = new list;
 if (linklist_counter == 0)
 {
  f = c;
  p = c;
  cout << " Enter data ";
  cin >> c->data;
 }
 else
 {
  p->next = c;
  p = c;
  cout << " Enter data";
  cin >> c->data;
 }
 c->next = NULL;
 linklist_counter++;
}
void linklist_dequeu()
{
 if (linklist_counter == 0)
 {
  cout << " Queue is empty";
  system("pause");
 }
 else
 {
  f = f->next;
  linklist_counter--;
  cout << "Number deleted \n ";
  system("pause");
 }
}
void linklist_show()
{
 int emp = linklist_isempty();
 if (emp)
 {
  temp = f;
  while (temp->next != NULL)
  {
   cout << " " << temp->data;
   temp = temp->next;
  }
  cout << " " << temp->data;
 }
 else
 {
  cout << " Queue is empty";
 }
 system("pause");
}
void linklist_front()
{
 int emp = linklist_isempty();
 if (emp)
 {
  cout << " " << f->data;
 }
 else
 {
  cout << " Queue is empty";
 }
 system("pause");
}
int linklist_isempty()
{
 return(linklist_counter != 0);
}

//function of DOUBLE LINK LIST
void dlinklist_call()
{
dlinklist_start:
 system("cls");
 cout << "\t\t\t\t Welcome in Double linklist Queue";
 int dinput;
 cout << "\n 1- Enqueu \n 2- Dequeu \n 3- show list \n 4- Front\n 5- Exit\n";
 cin >> dinput;
 switch (dinput)
 {
 case 1:
  dlinklist_insert();
  cout << " Number entered \n";
  system("pause");
  goto dlinklist_start;
 case 2:
  dlinklist_dequeu();
  cout << "Number deleted \n ";
  system("pause");
  goto dlinklist_start;
 case 3:
  dlinklist_show();
  goto dlinklist_start;
 case 4:
  dlinklist_front();
  goto dlinklist_start;
 case 5:
  break;
 default:
  cout << " You enter invalid number ";
  system("pause");
  goto dlinklist_start;
 }
}
void dlinklist_insert()
{
 current = new dlist;
 if (dlinklist_counter == 0)
 {
  previos = current;
  first = current;
  current->prev = NULL;
  cout << " Enter Data ";
  cin >> current->data;
 }
 else
 {
  previos->next = current;
  current->prev = previos;
  previos = current;
  cout << " Enter Data ";
  cin >> current->data;
 }
 current->next = NULL;
 dlinklist_counter++;
}
void dlinklist_dequeu()
{
 if (dlinklist_counter == 0)
 {
  cout << " Queue is empty";
  system("pause");
 }
 else
 {
  first = first->next;
  dlinklist_counter--;
 }
}
void dlinklist_show()
{
 if (dlinklist_counter == 0)
 {
  cout << " Queue is empty";
 }
 else
 {
  tamp = first;
  while (tamp->next != NULL)
  {
   cout << " " << tamp->data;
   tamp = tamp->next;
  }
  cout << " " << tamp->data;
 }
 system("pause");
}
void dlinklist_front()
{
 if (dlinklist_counter == 0)
 {
  cout << " Queue is empty";
 }
 else
 {
  cout << " " << first->data;
 }
 system("pause");
}



Project output images.

download c++ queue project
queue using array function

c++ queue using doubly or circular linked list


c++ queue using link list


Find more c++ simple projects


Read More...

doubly linked list queue in c++ source code

Leave a Comment
Doubly or circular linked list example using queue data structure. This c++ source code of queue has four main functions of queue.
  • enqueue
  • dequeue
  • show front
  • show list
It uses the concept of functions, pointer, struct and switch etc..

#include<iostream>
#include<windows.h>

using namespace std;

//Queue for Double Linklist
struct dlist {
	dlist * prev;
	int data;
	dlist * next;
};
dlist *first, *current, *previos, *tamp;
int dlinklist_counter = 0;
void dlinklist_insert();
void dlinklist_call();
void dlinklist_dequeu();
void dlinklist_show();
void dlinklist_front();

int main()
{
	system("cls");

    dlinklist_call();
   return 0;
}


//function of DOUBLE LINK LIST
void dlinklist_call()
{
dlinklist_start:
	system("cls");
	cout << "\t\t\t\t Welcome in Double linklist Queue";
	int dinput;
	cout << "\n 1- Enqueu \n 2- Dequeu \n 3- show list \n 4- Front\n 5- Exit\n";
	cin >> dinput;
	switch (dinput)
	{
	case 1:
		dlinklist_insert();
		cout << " Number entered \n";
		system("pause");
		goto dlinklist_start;
	case 2:
		dlinklist_dequeu();
		cout << "Number deleted \n ";
		system("pause");
		goto dlinklist_start;
	case 3:
		dlinklist_show();
		goto dlinklist_start;
	case 4:
		dlinklist_front();
		goto dlinklist_start;
	case 5:
		break;
	default:
		cout << " You enter invalid number ";
		system("pause");
		goto dlinklist_start;
	}
}
void dlinklist_insert()
{
	current = new dlist;
	if (dlinklist_counter == 0)
	{
		previos = current;
		first = current;
		current->prev = NULL;
		cout << " Enter Data ";
		cin >> current->data;
	}
	else
	{
		previos->next = current;
		current->prev = previos;
		previos = current;
		cout << " Enter Data ";
		cin >> current->data;
	}
	current->next = NULL;
	dlinklist_counter++;
}
void dlinklist_dequeu()
{
	if (dlinklist_counter == 0)
	{
		cout << " Queue is empty";
		system("pause");
	}
	else
	{
		first = first->next;
		dlinklist_counter--;
	}
}
void dlinklist_show()
{
	if (dlinklist_counter == 0)
	{
		cout << " Queue is empty";
	}
	else
	{
		tamp = first;
		while (tamp->next != NULL)
		{
			cout << " " << tamp->data;
			tamp = tamp->next;
		}
		cout << " " << tamp->data;
	}
	system("pause");
}
void dlinklist_front()
{
	if (dlinklist_counter == 0)
	{
		cout << " Queue is empty";
	}
	else
	{
		cout << " " << first->data;
	}
	system("pause");
}



Program output:
doubly linked list queue in c++
Read More...