I am implementing Priority QUE as a doubly linked list. My structs: typedef int kintyr; typedef struct qElem { struct qElem *prv; kintyr *dat; int *priority; }qElem; typedef struct que { qElem *fr,*bk; int cnt; }que; And this is my functions to create empty PQ, and to insert elements: que *qNew() { que *q = malloc(sizeof(*q)); if (q==NULL) return NULL; q->fr = NULL; q->bk = NULL; q->cnt = 0; qFault = 0; return q; } que *qEnq(que *q, kintyr *x, int *prrt) { que *zn=q; qFault = 0; if (q == NULL) { qFault = 1; return q; } if …

Member Avatar
Member Avatar
+0 forum 2

Hello all, I need to do some simple project for school in java eclipse... so I went to android developer page and downloaded the adt-bundle for windows... I have 64 bit windows so I downloaded 64 version... I start it and it gives me the error `Android sdk content loader has encountered a problem parsesdkcontent failed` I searched and searched google but nothing helps: I deleted android folder from users folder, I deleted workspace folder as well, stopped adb.exe from task manager... it just wont work... I must point out that a couple of months ago I did download this …

Member Avatar
Member Avatar
+0 forum 3

Hello, I have to code essentially what would mimic a std::map. I have a templated pair class, and a table class. I am given two tables, transition and action table, which are attached. Basically, I suppose to code a security system, where a door opens after someone punches in the combination BAAD. Anything else will sound the alarm. I understand the concept, but I do not understand how to create a mapping of the table. Below in the header file, `int (*Mapping)( Key k);` I cannot figure out how I would map key to value using the action and transition …

Member Avatar
+0 forum 0

In my Advanced Data Structures class we have an assignment to implement a linked list using arrays. One array holds the data item, while another contains a reference to the next item. I'm not really sure about how to add/remove items. // **************************************************** // Reference-based implementation of ADT list using arrays. // Due to the limitations with array of generics, the // "data type" for the list items is fixed to be of type // PageUsage. Any program using this class must specify // <PageUsage> as the value for the type parameter. // **************************************************** public class List<T> { // reference …

Member Avatar
Member Avatar
+0 forum 8

I am getting this error while installing ADT plugin in eclipse: Cannot complete the install because of a conflicting dependency. Software being installed: Android DDMS 21.0.0.v201210310015-519525 (com.android.ide.eclipse.ddms.feature.group 21.0.0.v201210310015-519525) Software currently installed: Eclipse IDE for Java EE Developers 1.3.0.20100617-0521 (epp.package.jee 1.3.0.20100617-0521) Only one of the following can be installed at once: Eclipse UI 3.6.1.M20100826-1330 (org.eclipse.ui 3.6.1.M20100826-1330) Eclipse UI 3.6.2.M20110203-1100 (org.eclipse.ui 3.6.2.M20110203-1100) Eclipse UI 3.6.0.I20100603-1100 (org.eclipse.ui 3.6.0.I20100603-1100) Cannot satisfy dependency: From: Android DDMS 21.0.0.v201210310015-519525 (com.android.ide.eclipse.ddms.feature.group 21.0.0.v201210310015-519525) To: org.eclipse.ui 3.6.2 Cannot satisfy dependency: From: Eclipse IDE for Java EE Developers 1.3.0.20100617-0521 (epp.package.jee 1.3.0.20100617-0521) To: org.eclipse.epp.package.jee.feature.feature.group [1.3.0.20100617-0521] Cannot satisfy dependency: From: Java EE IDE …

Member Avatar
Member Avatar
+0 forum 1

Hey guys, I'm working on Ubuntu 10.04. I use Eclipse as my IDE, but now I want to install the Android ADT plugin for eclipse(as seen [URL="http://developer.android.com/sdk/eclipse-adt.html"]here[/URL]). Now the thing is, that I don't have internet connection on the machine that has Eclipse running so I can't simply go to window>Install new Software>Add> and paste the URL ([url]https://dl-ssl.google.com/android/eclipse/[/url])... Is there a way to download the plugin files from a machine with a connection, put it on a flash drive, plug it in the non-connected machine, and install the plugins manually? Thanks in advance!

Member Avatar
Member Avatar
+0 forum 10

This is homework. I am trying to implement a Dictionary ADT using a hash-table with a closed addressing scheme. The problem is that I'm required to make a hash table of Word classes. How can I do this? The class has to be templated. Here is what I have so far: #include <string> #include <fstream> using namespace std; #ifndef DICTIONARY_H #define DICTIONARY_H template <typename DataType> class Dictionary { private: int size_; int words; int Hash(DataType); DataType* dictionary; class Word { private: Dictionary<string> dict; int key; string word_; public: Word(string word_) { this->word_ = word_; Key(word_); } void Key(string key_value) { …

Member Avatar
+0 forum 0

Hi all! I want to start making apps for android phones. The problem is that I have installed Android SDK, JDK 7 and eclipse, but failed to complete the install of the ADT plugin. I have install the plugin, but I can't configure it. the guide on android developer saids: Select Window > Preferences... to open the Preferences panel (Mac OS X: Eclipse > Preferences). Select Android from the left panel. You may see a dialog asking whether you want to send usage statistics to Google. If so, make your choice and click Proceed. You cannot continue with this procedure …

Member Avatar
+0 forum 0

Hi everyone, I want to implement an ADT Queue class (pointer base) use Template with following public interfaces: enqueue,dequeue,dequeueAll,peek,and size. I have 2 problems: 1.not sure how to dequeueAll which is removes all elements from the queue with Postcondition: size( ) returns 0 2.for dequeue and peek I need to make sure the Queue is not empty and not sure if i am doing it right. if (Queue_head == 0) EmptyQueueExceptionDequeue("empty queue"); Here is my code: [CODE] ///////////////Queue.h #include "EmptyQueueExceptionDequeue.h" #include "EmptyQueueExceptionPeek.h" template <class QueueItemType> class Queue{ public: Queue(); // default constructor Queue(const Queue& Q); // copy constructor ~Queue(); // …

Member Avatar
Member Avatar
+0 forum 8

I am trying to create an abstract data type for matrices. I have a function matrixInit to dynamically allocate memory for the structure and for the array. matrixCopy copies one matrix into another. there are functions to subtract, add and multiply matrices that return a pointer to memory where the Matrix structure is. I have included my .c file and my .h file below. I'm not exactly sure what's not working. I would appreciate it if someone could look at what I have and let me know where I'm going wrong. I believe that my first function is correct, and …

Member Avatar
Member Avatar
+0 forum 2

I am creating an abstract data type for strings implementing the string functions but not using the string library. I have my .c file and my .h file below. The problem seems to lie in addMystring I have commented out the area's that seem to have the problem. when they are not commented out I have a segmentation fault. though, it should work, so I believe that theres something wrong with my resizing functions, though I cannot figure out what. If someone could tell me what I am doing wrong I would appreciate it! [CODE] # include <stdio.h> # include …

Member Avatar
Member Avatar
+0 forum 7

I recently had an assignment for an advanced coding class where I was to create a Binary tree from inorder and preorder traversals. I first started out by creating my ADT for binary trees and working with that to create a new tree. The way I worked it was that I started by storing inorder traversal in an array and preorder in a queue and then I went through dividing the array into smaller arrays and passing it to the function again, recursively. The base case was when there was only one element in the array, i.e. a leaf. and …

Member Avatar
Member Avatar
+0 forum 5

I have attached the files. I think, there's a problem with listarr.cpp. I'm not yet good at c++ terminologies, please take time to download and see the files. I use dev-c.

Member Avatar
Member Avatar
+0 forum 6

The End.