1,306 Topics

Member Avatar for
Member Avatar for star34

Hi, i made a display()function that uses level-order traversal of the tree to display nodes level-by-level.I was told that I needed to put a queue class in my project. the hint was to put the queue in the root, do regular traversal but when we meet the marker, get() the …

Member Avatar for s_sridhar
0
205
Member Avatar for kartheepanmirra

Hi i am working swing based applet application which is deployed on a [B]jboss3.2.6[/B] webserver.the jar file [B]application.jar[/B] size is 140kb.i compressed the jar file using sun java pack200 technology as [B]application.pack200.gz[/B] file.now the jar file size is 46kb.the jar is deployed on application.war file with context-path [B]/application[/B] on the …

0
78
Member Avatar for jonnytabpni

Hi folks, I have a Client (A Till) and a server which I am developing in C#. I wish to implement some sort of network queuing system. So basically, when a method wants to send some data to the server, it will try first and if it fails, then add …

Member Avatar for jonnytabpni
0
115
Member Avatar for timb89

[code] void deleteNegative(queue <int> &q) { queue <int> temp; if (!q.empty()) { int x = q.front(); if (x >= 0) { temp.push(x); q.pop(); } else { q.pop(); } } while(!temp.empty()) { q.push(temp.front()); temp.pop(); } } [/code] just afunction that returns a queue without the negatives in the same order. unsure …

Member Avatar for Sky Diploma
0
76
Member Avatar for jcollins85

Hi I've been think about this for a while but the answer eludes me. I know its a pretty simple program but here's the snippet: [code] int main(void){ printf("Enter the operation of your choice\n"); int a; int b; int ch; while((ch = getChoice()) != 'q'){ printf("enter a value: "); if(scanf("%d", …

Member Avatar for jcollins85
0
142
Member Avatar for OffbeatPatriot

I've tried several times now to write my own neural network class and I think this is the closest I've gotten, the network seems to run properly but it doesn't seem to learn correctly. I'm trying to make it approximate exclusive or but it seems to be only capable of …

Member Avatar for OffbeatPatriot
0
152
Member Avatar for defender_

Hi, I am new to c++ programming.... i am working on a example and when ever i run the following code i get error "Server fifo failure" this is an example and should work alright but error making no sense... :( I am running this code using sun C++ compiler.... …

Member Avatar for defender_
0
154
Member Avatar for bhanu1225

Hello All. I am working on Mac OS X. I installed Python 2.5.4 and Mysql 5.1.31. For the interface, i installed Mysql-Python 1.2.2. I did the right steps for the installation. But , getting some warnings. So, i checked in Python shell for the modules. Python 2.5.4 (r254:67917, Dec 23 …

0
63
Member Avatar for Abbygail

Hey guys, I have been learning c++ while working with memory management i seem to have gotten stuck, There are 2 classes Stack and Queue the stack works on the LIFO principle (last in first out) and the queue the opposite FIFO (first in first out). Now the program runs …

Member Avatar for ArkM
0
284
Member Avatar for soudruhcz

Hi, that's my first bigger work in C++. Programm works good but I don't know where I have to alocate memory. And for which structures or something else I have to do alocation? Can anybody help me? Thx. There is my code: [CODE=c++] #include <stdlib.h> #include <ctype.h> #include <stdio.h> #include …

Member Avatar for soudruhcz
0
426
Member Avatar for dweller

Hello there guys, I'm new to C++ and i've got something to ask. I want to create several classes at different .cpp files. But i want to create objects from some of classes at other classes. let me explain it with an example: Main.cpp ClassA.cpp ClassB.cpp These are my cpp …

Member Avatar for dweller
0
185
Member Avatar for graffil

I have two queues Q1 and Q2 ; Q1 :A1,A2, A3 Q2: B1, B2, B3 and i want to merge them to newQ: like A1,B1,A2,B2 and so on...till the both Qs are empty what is best Algorithm do you think? I'm kind of confused i was thinking about a priority …

Member Avatar for Stinomus
0
99
Member Avatar for blackhawk9876

[CODE]Suppose that a stack s and a queue q of characters are initially empty. Show s and q after each iteration of the second for loop of the following code fragment: for(char ch = 'A'; ch <= 'H'; ch++) s.Push(ch); for(int i = 1; i <= 4; i++) { s.Pop(); …

Member Avatar for _Nestor
0
94
Member Avatar for Reg74

Here's my function that i call from main. However i'm getting an error "stackType undeclared" Does anyone know what i'm doing wrong ? [CODE="CPP"] template<class Type> void removeX(queueType<Type>& Q) { stackType<Type> stackQ; while (!Q.isEmptyQueue()) { stackQ.push(Q.front()); Q.deleteQueue(); } } [/CODE]

Member Avatar for Reg74
0
91
Member Avatar for Seamus McCarthy

Hey, i set up a circular queue to sort and pass ints easy, but having problems passing struct of information to the queue, wat declaration should i pass to insert function?? Here is my code so far, what would i change the int item to in insert function?? have just …

Member Avatar for Seamus McCarthy
0
162
Member Avatar for BlackStar

struct Fast_Food_Business { string name; Fast_Food_Business* head; Fast_Food_business* tail; }; struct cash_registers{ Fast_Food_Business * regist; cash_registers * r; } struct Customer { int n; Customer * h ; // head Customer *t; // tail Fast_Food_Business*next; }; bool menu (const char& number) { return number== '1' || number== '2'; } bool …

Member Avatar for tux4life
0
124
Member Avatar for timb89

i want to make a prgoram that will read in a set of numbers and determine whether or not they are prime numbers, this is what i got so far any ideas? [code] #include <iostream> #include <queue> #include <vector> using namespace std; int main() { queue <int> input; queue <int> …

Member Avatar for timb89
0
76
Member Avatar for exit

Hi All, I want to know if it is possible to change the 'Owner' name of a document that gets sent to the printer and is displayed in the Printer Queue Dialog Window? How would I go about doing that? Any Suggestions are most welcome! :)

0
90
Member Avatar for Duki

Hey everyone, I'm trying to make it so that my ^ operator is right justified within this binary expression tree. For example, 2^3^4 should be evaluated as 2^(3^4). So I should get 2^81, instead of the usual 2^12. Here is the code I have so far. Everything works, except the …

Member Avatar for Duki
0
487
Member Avatar for surender_kumar

Hi friends Please help me with suitable code snippets to simulate a 2-server queue in C.

Member Avatar for John A
0
91
Member Avatar for IrvineKinneas50

I'm implementing dijkstra's algorithm, and I'm implementing it using a priority queue so that the shortest distance is on top for fast access. The priority queue uses a vector for its operations. Each node has the following properties: int id int dist Node *path Here is the issue: when I …

Member Avatar for siddhant3s
0
92
Member Avatar for threat

i'm trying to make this program which simulates a printing queue, a very basic level program that implements priority queues. i'm stuck in the last function, i.e. the simulate function, there's that while(temp!=NULL){...} loop in simulate function which works perfect the first time but turns into an infinite loop the …

Member Avatar for nexocentric
0
162
Member Avatar for harrykokil

hi guys.. ive tried to integrate a timer code (which works fine) into a tkinter window but im having errors. can u plz fix it 4 me? thanks. this is the code i want to integrate. [icode] import Tkinter as tk import time def start(): global count_flag count_flag = True …

Member Avatar for jlm699
0
118
Member Avatar for gk0110

Hi all, I need to convert a JSP file to a PDF file dynamically After converting into PDF , I need to concatenate with another PDF which is already existing and this as a single document to the printer queue.. Please give ur suggestions.. Kindly post some source code which …

Member Avatar for peter_budo
0
37
Member Avatar for TuX4020

Hi all, So I've got an assignment of creating a priority queue using a heap data structure. I've read lots of pages online about the heap data structure, but I keep coming up with questions. In my class, I got the impression that a heap was structured similarly to a …

Member Avatar for jrw0267
0
138
Member Avatar for KaneShade

I'm getting a RunDLL error on startup that says as follows: Error loading C:\Windows\Qqafeco.dll The Specified module could not be found. After I close the notification box, my computer seems to be running ok, but goes through extremely slow periods where it sometimes takes text I write 10-15 seconds to …

0
54
Member Avatar for stillblazin

Hi, I need a way to do this: One server thread has to read a message from a client thread. The client will send the message to a queue and the server thread will read from this queue. The message being sent will contain: (3 different things) 1-ID of Client …

Member Avatar for jephthah
0
76
Member Avatar for rampalli.sarma

Dear friends, Greetings I am copying the code which is giving only one error. Please help. I have attached the file also.. cross.py [code] import subprocess, sys, socket, time, struct, random from traciControl import initTraCI, simStep, close, getVehNoOfIndLoop, setPhase PORT = 8813 NSGREEN = ["0101", "0101", "0000"] NSYELLOW = ["0000", …

0
48
Member Avatar for kid icarus

I had to implement a priority queue using binary heaps, which I think I have gotten completed, except for one method. We have implement a delete(Anytype X) method which deletes the object x from the priority queue. (It should return false if x is not in the priority queue, and …

0
74
Member Avatar for redhotspike

Working on a simulation which closely resembles waiting in a line at a bank. Program runs the simulation based on the user's inputs of # of servers, simulation time, average time between arrival, and transaction time. Here's what I have so far: [code] /*~~~prog3.cpp~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | Author: …

Member Avatar for redhotspike
0
240
Member Avatar for student_x

given a queue: queue<int> myqueue; write a function to remove the last entry in the queue. remark: you can't use stack, pointers, or linked list to do that. You can only use functions such as myqueue.pop(), myqueue.front() etc... Anyone has any ideas?

Member Avatar for student_x
0
6K
Member Avatar for christiangirl

Hello, I need to make this program sort the numbers entered with merge sort then print them. I am having trouble calling merge sort and getting it to print. Here is the code: [code] #include <iostream> #include "queueLinkedList.cpp" using namespace std; /*struct Item : Data { int value; Item *next; …

Member Avatar for christiangirl
0
199
Member Avatar for christiangirl

Hello, I am having trouble understanding linked lists. I have to make this program that takes input, stores it to a queue, outputs that input, then sorts it using mergesort and outputs it again. It all works except I'm not sure how to call the mergesort classes. Here is the …

Member Avatar for christiangirl
0
232
Member Avatar for Prabakar

Hi everyone, I am a little new to Java programming and am doing a simple project. The Problem is that I am able to connect but am not able to send any data. It is a little weird. The server gets the client's IP and the client to is connecting …

Member Avatar for Prabakar
0
98
Member Avatar for Duki

Hey guys, Can anyone tell me why this doesn't work in VS2008? I've commented out the #includes and whatnot so you can paste it into a single .cpp file and run it. Here are my errors: [quote]1>test.obj : error LNK2028: unresolved token (0A000320) "int __cdecl eval(class Tree<struct InfoNode> &)" (?eval@@$$FYAHAAV?$Tree@UInfoNode@@@@@Z) …

Member Avatar for Duki
0
411
Member Avatar for orangejuice2005

Am working on a big project and am at a particular point within it that requires me to do a couple of things with an array: Array size [1048] 1)How would I break up an array into 10 sections and further divide those sections into 100 spaces u know like: …

Member Avatar for orangejuice2005
0
117
Member Avatar for vartikachandra

i have made the following code... but i am having problems in accessing it.. [code] //structure for queue struct queue{ int items[MAX]; int front; int rear; }; //decleration of the queues :que_term for the values printed on the terminal struct queue que_mul2,que_mul3,que_mul5,que_sort,que_write,que_term; //initializing the queue void InitQueue(queue &q) { q.front=0; …

Member Avatar for vartikachandra
0
305
Member Avatar for drjay1627

if we use queue from c++ stl, we don't need //void enqueue(struct queue *q, int a) //int dequeue(struct queue *q) functions? my TA has it on the slides but since the c++ queue has push and pop enqueue and dequeue isnt needed, right?

Member Avatar for drjay1627
0
69
Member Avatar for gnit

I'm trying to create a simulation for a service line at a super market. The program builds just fine, but when I run it, I get: "Debug Assertion Failed! Program:... File:c:\program files\microsoft visual studio 8\vc\include\deque Line: 97 Expression: deque iterator not dereferencable" [code=c++] #include "stdafx.h" #include <iostream> #include <queue> #include …

Member Avatar for gnit
0
118
Member Avatar for Talguy

I'm new to threading and wanted to make a program that was going to receive data from two separate pieces of hardware and populate a queu with their data. I then wanted to pull the data out of the queue and draw it to the screen graphically. So each piece …

Member Avatar for Talguy
0
119
Member Avatar for homeryansta

csci>g++ -c queue.cpp csci>g++ queue.o project6.cpp Undefined first referenced symbol in file Queue<int>::return_index() /var/tmp//ccHbZwrM.o Queue<int>::enqueue(int) /var/tmp//ccHbZwrM.o Queue<int>::dequeue() /var/tmp//ccHbZwrM.o ld: fatal: Symbol referencing errors. No output written to a.out collect2: ld returned 1 exit status These are my errors. As you can see, my implementation file compiles, but does not compile …

Member Avatar for homeryansta
0
132
Member Avatar for IrishHenshin

Hi basically I've exhausted my mind looking for resources and help on the Huffman Tree Coding. This is my problem, there are 2 parts to what I have to do, the first done: 1. Given a text file, determine the frequency of each character in the text (map of character …

Member Avatar for monkey_king
-1
143
Member Avatar for homeryansta

Why won't this let me choose my own array size? Queue line[qs_pair] is what i'm concern about. As you can see, I have the user input from the terminal the size of the array. But when I compile it, it gives me an error on visual studio. line unknown size …

Member Avatar for Freaky_Chris
0
105
Member Avatar for kohuke

Hi. I'm trying to learn how to make my own web app and following those tutorials: [url]http://www.netbeans.org/kb/docs/java/gui-db.html[/url] [url]http://www.netbeans.org/kb/61/web/applets.html[/url] I created a desktop application like showed in the first guide. Then tried to integrate it into the Web Applet. But for some reason after right clicking my desktopapp's java file and …

0
102
Member Avatar for homeryansta

I'm trying to write a a program that simulates a multi queues, multi server such as a grocery line at the grocery store. The user will enter the desired number of queue/server pair. how would i write this? I mean, I can have 3 - 4 different queue stacks as …

Member Avatar for homeryansta
0
136
Member Avatar for JohnnyG23

This is for c++. Ok, I have most of this done but can't quite figure out how to get the queue to appear on screen. I also think I may have messed up my loops as well. What it is supposed to do is ask what the user wants to …

Member Avatar for Lerner
0
96
Member Avatar for Drahmina

Im just trying to load a PNG file i created of a background for a game I plan to produce eventually. However im not sure how you go about adding that image to the window. Ive opened up a standard windows app template with the following code. [code]#include <windows.h> /* …

Member Avatar for death_oclock
0
113
Member Avatar for noty1

Im looking for a code that shows how the directed graph is being implemented in C++ classes.Our teacher told us to use the queue algorithm. all i know is the concept of directed graph and its edge() and vertex(). But to create a program that shows how the direct graph …

Member Avatar for siddhant3s
0
91
Member Avatar for shaselai

I am trying to create a system where it has a number of queued slots and it accepts X incoming services. Now each service arrives/departs at different times so i could have one arrive 10 seconds from now and departs 20 seconds after arrival while the one after that could …

Member Avatar for BestJewSinceJC
0
97
Member Avatar for MentallyIll5150

I am constructing a class "dequeint" of integers and using circular queue storage. I get my code to compile but its output is garbage? Please HELP! .h [code] #include <iostream.h> #include <stdlib.h> const int MAXSIZE = 10; typedef int NodeType; class dequeint { private: NodeType NodeArray[MAXSIZE]; int headi; //head in …

Member Avatar for MentallyIll5150
0
163

The End.