1,306 Topics

Member Avatar for
Member Avatar for rose_2

this code is correct expect that part which calculate the waiting time .. it should be 0 in first process but in output it equals the burst time of 1st process. how can i fix it ? #include <iostream> #include<iomanip> #include<queue> using namespace std; int main(){ queue<int> sc; float tat …

Member Avatar for tinstaafl
0
1K
Member Avatar for gajen007

An assignment is given to prepare a prolog code for the following scenario. Five bikes with colors Red, Blue, Black, White and Grey are in queue. At least one in front of Red and at least one behind the Blue. At least one in front of Black and at least …

Member Avatar for rubberman
0
169
Member Avatar for rose_2

i know it's too much long but i really need some help to fix the program errors , am stuck within whole code lines and ma mind went confused .. it's airport simulation program the airport has one runway .. one plane can land and one plane can fly but …

Member Avatar for David W
0
249
Member Avatar for hudahamid

i am new to queue..can somebody help me on this.im stuck at selction 2,3 and 4 #include <iostream> #include <queue> // Queue STL #include <time.h> using namespace std; int displayMenu() { int menu; cout <<"\t\tQueue Numbering System"<< endl; cout <<"`````````````````````````````````"<< endl; cout <<"1. Generate queue number"<< endl; cout <<"2. Get …

Member Avatar for David W
0
229
Member Avatar for gpellis

Alright, I am taking a summer course on Operating Systems and it has been a while since I took Java. I am trying to re-learn everything that I have forgotten. In my field, Java was only required as an introduction class and therefore my level of programming in a computer …

Member Avatar for April Jam
0
787
Member Avatar for playagain

Please help me to build a list of examples of stack and queue in real life situation... Conditions: The object concerned must only one object. And the object must be tangible. Example: Queue (FIFO): The bullet in a machine gun..(you cannot fire 2 bullets at the same time) Stack (LIFO): …

Member Avatar for priya..
-2
12K
Member Avatar for negru

How to print path of a binary tree after adding every node (branches of a tree have values 0 and 1)? For example, I have this binary tree: NODE1 has two children, NODE2 and NODE3. Branch from NODE1 to NODE2 is 0, and from NODE1 to NODE3 is 1. From …

Member Avatar for rubberman
0
188
Member Avatar for usmanjani

C++ HELP: hello i made a program where user enter any message then fing its frequency and push it on the queue and sort it i want to sort it again by which element in the same piority entered please anyone can help>? for example for this message: "Eerie eyes …

Member Avatar for usmanjani
0
254
Member Avatar for manateejoe

I am trying to create a GUI using Tkinter, that reads in serial data. I eventually want multiple check buttons (for each possible port), and when the checkbutton is clicked, I would like the raw data from the port to continuously print onto a textbox in the GUI. I did …

Member Avatar for woooee
0
2K
Member Avatar for printf

Representing the list may or may not matter for a specific algorithm, but what does a list has to do with a stack/queue?

Member Avatar for JamesCherrill
0
156
Member Avatar for Bensirpent07

I have some JQuery code where an if-then statement is being run after a .slideToggle event. I just don't understand why the if section is still being run when it would appear the if statement is false. Code incoming: JQuery: $(function() { var pull = $('#pull'); menu = $('div#nav ul'); …

Member Avatar for Bensirpent07
0
224
Member Avatar for Bensirpent07

As you can see in the picture below, the whenever I hover over an element in the corner, the element is seeming to over-ride the border and is going over it instead of behind it. I'm assuming that's because of the "box-sizing: border-box;" in the CSS, how would I deal …

Member Avatar for Bensirpent07
0
283
Member Avatar for scheppy

Ive made a java program to do automated tasks for a game. It takes screen shots with java.robot every 250 milliseconds. The program is working great, but it will always crash at around the 30min mark Im running this program on my mac, and this is the crash report that …

Member Avatar for scheppy
0
983
Member Avatar for loteni

I'm struggling writing a java program that implement a queue. and another that implement a stack.

Member Avatar for rubberman
0
94
Member Avatar for scheppy

Ive made a java program to do automated tasks for a game. It takes screen shots with java.robot every 250 milliseconds. The program is working great, but it will always crash at around the 30min mark Im running this program on my mac, and this is the crash report that …

Member Avatar for scheppy
0
426
Member Avatar for abdurehim
Member Avatar for Khalil_2

Bank Waiting Times Customers often have to wait during the acquiring and consuming many products and services. Many banks participated in an experiment testing customers’ satisfaction with waiting in the line. The experiment produced the following data (as an example): Table 1. Waiting times of bank customers at different banks …

Member Avatar for Schol-R-LEA
-1
258
Member Avatar for Tomaž

I am computer technitian. Unfortunately deteriorating economic conditions prevent me from finding an employment that matches my education and I also am unable to afford any formal education, but I digress. I have mentioned my education to clarify that I already have some knowledge with programming languages forehand, however these …

0
113
Member Avatar for Wojciech_1

What a nonsense..... I was testing Tutorial Draft from Type of Article, and clicked on **Cancel** to see what? My testwriting added to.....moderation queue..... nice ;) Next thing - cannot see who voted on post/article...... I got -1 for my prev input (maybe thats correct name for that) and Ive …

Member Avatar for Reverend Jim
-4
337
Member Avatar for brandon66

Im trying to implement queue with a linked list i think i have the enqueue function correct but im having problems with the dequeue. I can get it to delete the first number but then the rest of the list is empty can someone point me in the right direction? …

Member Avatar for brandon66
0
247
Member Avatar for samsungfanb0y

How does a person go about adding an item to a queue within a gui? I have a textarea and a textfield.

Member Avatar for JamesCherrill
0
79
Member Avatar for Joshua_11

Everytime I try to start a new topic at programmingforums.org I see this message: Xandy, you do not have permission to access this page. This could be due to one of several reasons: Your user account may not have sufficient privileges to access this page. Are you trying to edit …

Member Avatar for pritaeas
0
341
Member Avatar for Roger_2

i am working on an infix to postfix project and have reached a troubling point. one by one i must extract a string token from the string being inputted to the method infixtopostfix and one by one input them to the front of the deque named postfix. i dont understand …

Member Avatar for Roger_2
0
548
Member Avatar for sahar.97
Member Avatar for sahar.97
0
219
Member Avatar for Alyssa_2

This is my last question over my current running project. For some reason, when i call my object in my main program it gives me errors. If I try to call it as: Checkout_Simulation sim_obj; Then I get errors: Checkout_Simulation.cpp:16: error: missing template arguments before ‘sim_obj’ Checkout_Simulation.cpp:16: error: expected `;' …

Member Avatar for Moschops
0
719
Member Avatar for Huseyin_1

Hi programmers, i need to have a code to produce a round robin algorithm. Can you help me?? The requirements are that it must have: A menu system with the options (1 input data manually-if option 1 is selected a)to read data from file, b)to enter data by hand, 2-automatic …

Member Avatar for somjit{}
0
282
Member Avatar for hellocsprogram

Hi I am wondering how you would create a program for the knight tour instead of using recursion using a stack. I just want the ideal behind using a stack/queue instead of recursion please no code:)

Member Avatar for StuXYZ
0
661
Member Avatar for malcolmsand

Hello guys, I have a problem with Win32 C++ GUI. I'm creating a program and as one of the steps, I want to: 1. Let the user type somthing in the textbox, 2. Show it in another box/area, 3. Clear the typed text from the textbox. It would be something …

Member Avatar for triumphost
0
9K
Member Avatar for vegaseat
Member Avatar for divyakrishnan

I am using uploadify to upload images in php. After uploading the files, showing the progress bar as completed but the uploads folder is showing as empty. I have downloaded the script and just added a new folder to upload files as uploads folder. Here is my code index.php <!DOCTYPE …

Member Avatar for network18
0
2K
Member Avatar for khadikhel.orakzai

write a c++ program that will do the . Enter 10 integer . Pushing on stack and poping on user choice . pushing on queue and poping form queue . Bring the integer in order. Display the calculator selecting oprtion by user choice (+,-,*,%)

0
92
Member Avatar for bc230201818

PLease write a better code which is rather advance form using #include<queue> && #include<list> #include<iostream> #include<conio.h> #include <iomanip.h> using namespace std; const int size=20; // Patient Class class Patient { int age; char name[30],phy; public: Patient() { age=0; strcpy(name,""); phy=NULL; } void SetName(char* P_name) { strcpy(name,P_name); } void SetAge(int P_age) …

Member Avatar for bc230201818
0
183
Member Avatar for Hector_2

I can't get it to compile. I've tried so many things. The errors |29|error: expected unqualified-id before '{' token| |266|error: expected '}' at end of input| |266|error: expected unqualified-id at end of input| ||=== Build failed: 3 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===| Here is the code` #include …

Member Avatar for Hector_2
0
286
Member Avatar for ozzan93

Hey everyone, I have an assignment for tomorrow and I don't have any clue about this last question. "Q5- Consider a waiting queue in a bank with customers who are issued direction slips. They are asked to move to following service terminals depending on their customer numbers being divided by …

Member Avatar for L7Sqr
0
420
Member Avatar for Builder_1

Simulate a patient’s lines using queues with enqueue ( ), dequeue ( ) and printQueue ( ) operations. Define a queue node in the following manner: typedef struct queueNode { int patientID; // Unique identifier; starts at 1; after 24 hours should be reset to 1 int checkupTime; // Random …

Member Avatar for Builder_1
0
380
Member Avatar for veljko

I need a maze solver that uses queue type breadth first search to find a way out of the maze and print it out. I already made a dfs one but i cant seem to figure out how to make a bfs one. Here it is: #include <stdio.h> #define red …

Member Avatar for gusano79
0
964
Member Avatar for Jesse_4

//I need help on where to go from here, mostly in the main. //The instructions and requirements can be found in the attachment. /********************************* Queue header file ********************************/ #ifndef QUEUE_H #define QUEUE_H #include <iostream> using namespace std; class Queue { private: class QueueNode { friend class Queue; int value; QueueNode …

Member Avatar for David_50
0
1K
Member Avatar for aluhnev

//Hi all,can someone help with this problem //I am stack,need to output all functions in main,with user input for queue and stack,but first queue //This is my .h and .cpp of queue #include "stdafx.h" template <class ItemType> struct NodeType; template <class ItemType> class QueType { public: QueType(); // Class constructor. …

Member Avatar for richieking
0
201
Member Avatar for skuller74

I am writing code to simulate a queue at a bank, which calculates the average wait time of all customers that enter the queue. I'm getting a STATUS_ACCESS_VIOLATION at line 56 of program3.cpp. I've had this error before and I'm pretty sure it happens because of an attempt to act …

Member Avatar for Inderjeet_1
0
8K
Member Avatar for Inderjeet_1

The simulator will simulate one or more line-ups for customer service at a business. In the default setup, it will take between 1 and 6 minutes for a customer service request to be handled (random) once a customer reaches the front of the queue, after which the customer will leave. …

Member Avatar for Inderjeet_1
0
138
Member Avatar for Sunil_12

Hello All, I want to write a c++ code to sort a queue with the help of another queue and a non array element. Please help me getting the code.

Member Avatar for Sunil_12
0
604
Member Avatar for hwoarang69

How can I use seleium test case in groovy? such as clinking on links. test case <html> ... <body> <table> <tr> <td>open</td> <td>https://url.web:8010/</td> </tr> <tr> <td>clickAndWait</td> <td>link=service=homeLink</td> </tr> <tr> <td>clickAndWait</td> <td>link=name=contentLink,service=Queue</td> </tr> <tr> <td>clickAndWait</td> <td>link=BackLink</td> </tr> ... groovy script // Setup credentials def String[] credentials = new String[2] credentials[0] = …

0
148
Member Avatar for Slavi

Hey guys, Just got a quick question ... I am implementing a client GUI, and part of the requirements are that the client is able to start, stop and restart the server. This got me a bit confused since the client connects after the server is running. What I am …

Member Avatar for Slavi
0
319
Member Avatar for Slavi

Hey everyone, I am facing an implementaton issue here ... hopefully someone can give me a hand .. So I am implementing a client-server communication, where the server has to act as a print server. In other words, the client simulates to be next to a printer and can send …

Member Avatar for Slavi
0
193
Member Avatar for Builder_1

#include<iostream> #include<conio.h> #include<string> using namespace std; struct node{ char data; node * next; }; void queue1(); void queue2(); void queue3(); void queue4(); void concatenate(); node * firstnodeptr1=NULL; node * lastnodeptr=NULL; node * firstnodeptr2=NULL; node * firstnodeptr3=NULL; node * firstnodeptr4=NULL; node *finalfirstnodeptr=NULL; int counter1=1,counter2=1,counter3=1,counter4=1; void main(){ char ch; do{ cout<<"enter the …

Member Avatar for NathanOliver
1
497
Member Avatar for Rashmi_1

prog6.h #include "340.h" #include "binTree.h" #ifndef H_PROG6 #define H_PROG6 const vector < int > A{ 1, -2, 3, -4, 5, -6, 7, -8, 9, -10, 11, -12, 13, -14, 15 }; const vector < float > B{ 0.5, 1.75, -3, 4.25, 5.50, -6.75, 8, 9.25, -10.5 }; const vector < …

Member Avatar for Banfa
0
347
Member Avatar for COKEDUDE

I am using a priority queue with a double as the priority. I am guessing this is cause so issues. I used these numbers first with no issues. 34.365681 34.481879 34.539832 36.715120 I then used these numbers and had a segmentation fault. 45.411042 40.481879 37.702110 38.951187 struct PRIORITYQUEUE { int …

Member Avatar for Schol-R-LEA
0
233
Member Avatar for COKEDUDE

I was reading this example of Priority queues and have several questions. http://matrixsust.blogspot.com/2011/11/basic-priority-queue-in-c.html #include<stdio.h> #include<malloc.h> void insert(); void del(); void display(); //How exactly do structs in structs work? Do you need to do anything special with them? Is this a //form of a linked list? Which part of this is …

Member Avatar for COKEDUDE
0
1K
Member Avatar for psmb

I need a C++ program to implement a heap based priority queue which accepts job ID, priority number and submitter name as inputs. the program should heap sort whenever a new job ID or priority or submitter name is entered. The jobs that have maximum priority should be extracted (along …

Member Avatar for mike_2000_17
0
194
Member Avatar for redtribal23

Below is my queue code. Whenever I enter nos. 1 to 8, it will print 1-7 then replace 8 with 0. If there are any other mistakes in my code please let me know. import java.util.Arrays; import java.util.Scanner; public class Queue { private int[] elements; //integer values from scanner private …

Member Avatar for Tarek_2
0
358

The End.