Member Avatar

[CODE=C++] #ifndef LIST_H #define LIST_H #include <iostream> typedef char Item; class List{ public: List() {first = NULL; last = NULL;} //~List() void append(Item entry); void remove_last(); void output(); private: struct Node { Item data; Node *next; Node *back; }; Node *first; Node *last; }; #endif [/CODE] I'm writing a class file to store a doubly linked list. This file will not compile on unix. can anyone find any problem with it? error message here: csci>g++ -c list.h quota_ufs: over hard disk limit (pid 20807, uid 202938, inum 1115162, fs /export/home) list.h:33: fatal error: can't write PCH file: Disc quota exceeded …

Member Avatar
0
15
Member Avatar

Hello, I know RIM is pretty much dead, but I need help with some development. I'm currrently developing an app that pushes data to my device. I downloaded some code that was supposedly developed by blackberry called the Emergency Contact List. Here is my issue: The gui isn't popping up when the app runs. I believe that the code is simple enough so that you may help me figure out this issue. The source code can be found here: [url]http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/796557/800451/1055819...[/url] However, here is my short version of the code just so that you can see what I'm doing. This is …

0
1
Member Avatar

[CODE=C++]void List::remove_last() { if(first == NULL) { first -> data = ' '; } else { Node *newnode; newnode = new Node; newnode = NULL; newnode -> data = last -> back -> data; last = newnode; } }[/CODE] am I doing something wrong? I'm trying to remove the end of list node.

Member Avatar
0
6
Member Avatar

I created a piece of code that simulates a pendulum with the gravity(assuming no friction or resistance). However, it is not as smooth as I want it to be. So.. does anyone know what I can do to make it smoother? [CODE=java] import java.awt.*; import java.awt.event.*; import java.lang.Math; import java.lang.Runnable; class gui extends Canvas implements Runnable{ int x_not, y_not; gui(int width, int height){ x_not = width/2; y_not = height - (height - 50); } //end constructor public void paint(Graphics g) { double phi; try { //The sleep() method is invoked on the main thread to cause a one second delay. …

Member Avatar
0
5
Member Avatar

Greetings fellow programmers! I'm doing a computer vision project in my AI class and am looking for some tips. My task is to read a bitmap into memory and alter that image file and find an object within it. In my case, I'm searching for a box that appears in the picture. For simplicity, the images are only black and white (0-255). So far, I'm able to read the file into memory and store them into an array for both the header and the image data. My plan is to convert the data in the array(each array element is the …

Member Avatar
0
6
Member Avatar

[CODE=cpp]void BOARD_Unselect_All(System::Windows::Forms::Form^ Frm) { Frm.a1->BackgroundImage = Image::FromFile("elephant_pla.gif"); }[/CODE] a1 is a picturebox from the form. How do you use the buttons, picturebox, etc from the form being passed in?

Member Avatar
0
19
Member Avatar

I'm currently converting an application that utilize sqldmo which has a feature .script that can just magically retrieve a script for a particular index for me. Is there a query I can write or a already built in stored procedure I can use to do similar things? Any help would be greatly appreciated. thanks, Homer

0
1
Member Avatar

as the title states. Is there a way to determine if both datatypes are the same?

Member Avatar
0
3
Member Avatar

hello all! Anyone know how to count all the constraints in a given table? I'm new to stored procedure and need it to finish some work.

Member Avatar
0
7
Member Avatar

can I have 2 form share the same progress bar? If so how does this work?

Member Avatar
0
4
Member Avatar

I've been working on this for hours! the code makes perfect sense, but wont' work!!! aaah! about to pull my hair out. the code is suppose to do get the sum of this 1/1 + 1/2 + ..... + 1/n I blocked all the codes and just print out the v0 value in float form, but it's the same problem so I'm assuming its coming from the conversion. But I followed the codes closely, shouldn't be any errors. [CODE] .text .globl __start __start: la $a0, prompt #print the directions to screen li $v0,4 # Register Use Chart # $f0 --- …

Member Avatar
0
4
Member Avatar

how do you do a square root in MIPS? I have to write a program to find the hypotenuse of a right triangle and I'm stuck on this part. Please help.

Member Avatar
0
14
Member Avatar

hello everyone! i usually hang around the c++ area, but I'll need to learn assembly for computer architecture 2 in the fall so here it is. I wrote a simple program to convert temperatures from C to F. PCspim doesn't like it for some reason. here are my codes, it just won't run. [code=assembly] .text .globl _start _start: la $a0, prompt li $v0, 4 syscall li $v0, 5 syscall mul $t0, $v0, 9 div $t0, $t0, 5 addi $t0, $t0, 32 la $a0, ans1 li $v0, 4 syscall move $a0, $t0 li $v0, 1 syscall la $a0, endl li $v0, …

Member Avatar
0
5
Member Avatar

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 with the client program. What is going on? I checked all the templates and they seem fine. Can anyone point me the right direction. queue.h [CODE=c++] #ifndef QUEUE_H #define QUEUE_H const int MAX = 100; template <class Item> class Queue{ public: Queue() { front = 0; rear = MAX - …

Member Avatar
0
4
Member Avatar

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 cannot allocate an array of constant size 0 it works on unix, but does not work on visual studio. Anyone has any idea why? [CODE=c++] #include <iostream> #include "queue.h" #include <iomanip> using namespace std; int get_lowest(Queue [], int); int main() { int qs_pair = 10, maxtran, prob, dur, seed; int …

Member Avatar
0
3
Member Avatar

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 default, but I'm not sure how to do it if the user actually chooses the number of queues/stacks. Any help would be greatly appreciated! here is the link to the project if my english suck. [url]http://web.stcloudstate.edu/bajulstrom/cs301/projects/p6s09.html[/url]

Member Avatar
0
8
Member Avatar

I have a linked list of operators ()+-*/ , how would I be able to compare them if they are all of type char? I looked at the ascii table, but they are all out of order so that isn't a choice.

Member Avatar
0
17
Member Avatar

[CODE=c++] inFile >> x; while(!inFile.eof()) { if(x == '\n') { cout << endl; } cout << x; inFile >> x; }[/CODE] will this code detect end of line? I'm having trouble with this. Can anyone help?

Member Avatar
0
20
Member Avatar

[CODE] ifstream inputfile; cout << "enter the name of the file: "; cin >> filename; inputfile.open(filename); string temp; int i = 0; while(filename != NULL) { while(isalpha(filename)) { temp[i++] = filename; } if(i > 0) { insert(temp, 1); i = 0; } } [/CODE] this is my code, what am I doing wrong? I'm creating a linked list(not a part of the question asked), I'm inserting all the words from a file into the list. am I extracting the word the wrong way? someone please show me the light :)

Member Avatar
0
9
Member Avatar

[CODE=C++]/************************************************* Student: xxxxx ID number: xxxxx Instructor: Dr. Julstrom Class: CSCI 301 Project 1 *************************************************/ #include <iostream> #include <cmath> #include <cctype> using namespace std; const int SIZE = 61; int getinput(char []); void compare(char [], char [], int, int); /************************************************* The purpose of this program is to have a user input 2 sets of different characters, either let it be just plain characters or a sentence of a mixture of everything, the program will collect the alphabetical character and return a state whether the characters match or not regardless of order. *************************************************/ int main() { char sentence1[SIZE], sentence2[SIZE]; /************************************************* a …

Member Avatar
0
10
Member Avatar

I'm trying to pass a character as parameter into a function. I will then get the user's input( characters and numbers etc), the function then will return all the input characters excluding everything else. I've gotten the sorting the characters from everything else figured out, but returning the array back to the main function is my main concern. first attempt: pointers! problem: having trouble storing the values from the address of the pointer into another array. second attempt: ...... not sure what to do next.

Member Avatar
0
15
Member Avatar

[CODE]void getinput(char sentence) { cout << "enter something => " << endl; char ch; cin.get(ch); int count = 0; int i = 0; while(ch >= ' ' || count >= SIZE) { if (isalpha(ch)) { [B] [COLOR="Red"]sentence[i] = ch; [/COLOR][/B] i++; } cin.get(ch); count++; } }[/CODE] This is the function I wrote, the part in bold cannot be compiled for some reason. Can the veterans point a noob the right direction please?

Member Avatar
0
3

The End.