Queue - c++ program, C/C++ Programming

Queue - C++ program:

Write a program to show the basic operations on queue.

namespace stack {

 const int max_size = 200;

 char v(max_size);

 int top=0;

 void push (char c)  { v[top++]=c;      }

 char pop (){return v[top--]; }



void f()

{  stack::push('a');



void main()

{  f();



Posted Date: 10/19/2012 3:03:03 AM | Location : United States

Related Discussions:- Queue - c++ program, Assignment Help, Ask Question on Queue - c++ program, Get Answer, Expert's Help, Queue - c++ program Discussions

Write discussion on Queue - c++ program
Your posts are moderated
Related Questions
Program to Open a file in C++: int main() {                  char ch;                  ifstream f1 ("OLDFILE.TXT");                  ofstream f2 ("NEWFILE.TXT");

Define a structure to store roll no, name and marks of a student. b) Using the structure of Q2. a), above write a ''C'' program to create a file "student.dat". There must be one r

A: Use references when you can use, and use pointers when you have to. References are generally preferred over pointers whenever you don't require "reseating". Usually this mean

padovan string for natural numbers program in java // aakash , suraj , prem sasi kumar kamaraj college program 1 : package test.padovanstring; public class Padov

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b

Program to draw a circle: int main(void) {    /* request auto detection */    int gdriver = DETECT, gmode, errorcode;    int midx, midy;    int radius = 100;

Overloading a method (or function) in C++ is the ability for functions of the similar name to be defined as long as these methods have dissimilar signatures (different set of param


A: Provided that function parameter is "const reference", compiler create temporary variable in following two ways. a) The actual argument is the correct type, however it isn't