Search Results

Showing results 1 to 40 of 56
Search took 0.01 seconds.
Search: Posts Made By: jasweb2002
Forum: Java Mar 24th, 2005
Replies: 4
Views: 2,421
Posted By jasweb2002
Hey everyone,
Alright, my project requires that I write a program to demonstrate my understanding of class inheritance. Problem is the teacher wants us to use Java, something I have never used and...
Forum: C Feb 17th, 2005
Replies: 1
Views: 1,450
Posted By jasweb2002
Never mind, i got it.
Forum: C Feb 17th, 2005
Replies: 1
Views: 1,450
Posted By jasweb2002
Hi everyone,
I need to write a compiler using Yacc and I have encountered a problem. Since some of the code is C i thought I would try here. The problem occurs at one line in the following...
Forum: Legacy and Other Languages Feb 16th, 2005
Replies: 1
Views: 3,103
Posted By jasweb2002
Hi everyone,
I need to write a compiler with Yacc that will basically perform minor algebraic commands. Here is the code so far for the Yacc part.


%token INTEGER VARIABLE READ WRITE
%left...
Forum: C++ Dec 12th, 2004
Replies: 22
Views: 10,233
Posted By jasweb2002
Are you expecting someone to write the code for ya?
Forum: C++ Dec 12th, 2004
Replies: 11
Views: 3,807
Posted By jasweb2002
Speak clean english and you might get a few more responses.
Forum: C++ Dec 6th, 2004
Replies: 3
Views: 2,563
Posted By jasweb2002
I had a feeling my grasp of declaring the arrays was the problem. Could anyone tell me why the seg fault occured though after the entire program ran instead of when it hit that bad code?
Forum: C++ Dec 5th, 2004
Replies: 6
Views: 9,635
Posted By jasweb2002
Don't know if there is a function built-in off the top of my head but it would be so easy to just write your own.

double max_find()
{
double max = 0; // This may need to be initalised...
Forum: C++ Dec 5th, 2004
Replies: 3
Views: 2,563
Posted By jasweb2002
I am writing a program that will build a graph and then find the lowest costs between any given vertices. I have the program building the graph just fine, but now I just started to write the part...
Forum: C++ Dec 4th, 2004
Replies: 1
Views: 10,445
Posted By jasweb2002
I need to set a variable to infinity or the highest possible number for the computer. But I have no idea how to do this. I did this a little while dabbling in assembly but I am unsure how to do...
Forum: C Nov 22nd, 2004
Replies: 3
Views: 2,567
Posted By jasweb2002
Are you kidding me? The last person to try this at least offered to pay money. :rolleyes:
Forum: C++ Nov 22nd, 2004
Replies: 5
Views: 2,442
Posted By jasweb2002
If you can't write it in english you won't be able to write it in c++.

A quote from my teacher, "the sooner you start to code, the longer the program will take to write".
Forum: C++ Nov 22nd, 2004
Replies: 1
Views: 4,763
Posted By jasweb2002
Your function loan_schedule is written wrong. The function header requires parameters. While your function call and prototype have no parameters. I'm surprised it even compiles.

Future note...
Forum: C++ Nov 21st, 2004
Replies: 3
Views: 2,188
Posted By jasweb2002
I've never seen the time function but I would just guess it would have to look like this.

a=sqrt(x);
j=time(sqrt(x));
Forum: C++ Nov 16th, 2004
Replies: 4
Views: 3,177
Posted By jasweb2002
average=(.4f*midterm)+(.6f*final);

What are the f's for?
Forum: C Nov 15th, 2004
Replies: 7
Views: 2,083
Posted By jasweb2002
Where is the problem occuring? Have you done any debugging at all? Do your records that you attempt to sort even exist?
Forum: C++ Nov 15th, 2004
Replies: 8
Views: 2,417
Posted By jasweb2002
So you don't need to use cout << " "; as you originally stated?
Forum: C Nov 15th, 2004
Replies: 2
Views: 1,855
Posted By jasweb2002
Oh, how about

fin >> some_array[whatever_index];

I think you can fill in the right names.
Forum: C++ Nov 15th, 2004
Replies: 8
Views: 2,417
Posted By jasweb2002
Oh yeah, also your b and c variables are only initialized to work the first time through. After the first run b and c are equal to zero and therefore those two nested for loops will do nothing. I...
Forum: C++ Nov 15th, 2004
Replies: 8
Views: 2,417
Posted By jasweb2002
First thing I see on quick glance is you need an endline command at the end of the for loop.
Forum: C Nov 15th, 2004
Replies: 10
Views: 3,101
Posted By jasweb2002
No, variable names can be whatever you want. If you want to can choose to use only one letter variable names. Or you could have variable names that look similiar to previous post. Or you can use a...
Forum: C++ Nov 14th, 2004
Replies: 4
Views: 3,177
Posted By jasweb2002
Is it compiling? I am not 100% confident with c++ but I don't think what your doing is possible. Try something like this...

final_grade = (.4*midterm)+(.6*final);
Forum: C Nov 14th, 2004
Replies: 10
Views: 3,101
Posted By jasweb2002
Just curious, was that code segment from the book or did you just make it up without thinking about the logic? Just looks like a goofy piece of code.
Forum: C Nov 12th, 2004
Replies: 1
Views: 1,823
Posted By jasweb2002
I can't help you but I have a feeling for anybody to be able to help you, you are going to have post some more info. You are asking a pretty broad question right now.
Forum: C++ Nov 12th, 2004
Replies: 7
Views: 2,072
Posted By jasweb2002
Whats wrong here? Are you having a problem or do you expect someone to write the program for you?
Forum: C++ Nov 11th, 2004
Replies: 2
Views: 2,015
Posted By jasweb2002
^^
Exactly. You need to find where the seg fault is hitting. When I have that problem, I usually fill my program with stupid couts like "entering _____ function", "about to enter so and so loop",...
Forum: Computer Science Nov 11th, 2004
Replies: 3
Views: 7,249
Posted By jasweb2002
Have you read some of the shit Narue has had to answer? I think this thread was quite uncalled for. I personally have no problem with Narue and have received good help from him/her on a couple of...
Forum: C++ Nov 11th, 2004
Replies: 1
Views: 1,901
Posted By jasweb2002
cout<<"\naverage of these numbers: "<<ave<<endl;

You are not passing any of you parameters in ave. I am surpised it is compiling at all. Should look like ave(array, 10).
Forum: C++ Nov 8th, 2004
Replies: 10
Views: 2,385
Posted By jasweb2002
That was quick. Told ya there might be more efficient ways. :D
Forum: C++ Nov 8th, 2004
Replies: 4
Views: 1,681
Posted By jasweb2002
Ok, so the destructor would look something like this.


// Implementation File
#include <string.h>
#include <iostream>
#include "tree.h"
using namespace std;
Forum: C++ Nov 8th, 2004
Replies: 10
Views: 2,385
Posted By jasweb2002
Heres a quick algo I just threw together. There probably are more efficient ways but this gets the job done.


float min, max, temp, count;
count = 0;

cin >> max; // Read in first #
cin...
Forum: C++ Nov 8th, 2004
Replies: 9
Views: 23,369
Posted By jasweb2002
I didn' know you could resize an array. I thought thats what vectors were for.
Forum: C++ Nov 8th, 2004
Replies: 4
Views: 1,681
Posted By jasweb2002
Huh, I was under the impression that the destructor was basically a C++ function where ~(constructor) would automatically delete everything to do with the class. I didn't know I had to write that...
Forum: C++ Nov 7th, 2004
Replies: 4
Views: 1,681
Posted By jasweb2002
Hey everyone,
I just started writing this program when I hit a problem with the destructor. Me and my buddies in the lab could not figure out what is going on. The error said something about...
Forum: C++ Nov 2nd, 2004
Replies: 5
Views: 2,244
Posted By jasweb2002
First, your surface equation is wrong. Surface area is simply lengh*width. I'm not even sure what that equation you are using will actually calculate.

The warning comes from cramming a double...
Forum: C++ Nov 2nd, 2004
Replies: 1
Views: 1,923
Posted By jasweb2002
Just a handful of errors.

First it probably was not compiling because of this area

int hours, //#of hours
minutes, //# of minutes

should be

int hours, minutes;
Forum: C Nov 2nd, 2004
Replies: 1
Views: 2,519
Posted By jasweb2002
Hey Everyone,
I need to write a program where the first half builds what is basically a file directroy tree. Files and their paths will come in from file in the form...

/program/file/whatever
...
Forum: C++ Nov 1st, 2004
Replies: 3
Views: 2,801
Posted By jasweb2002
First, are you familiar with a stack and its methods?

If you are the process is simple. Based on what you have said,

while(!eof(yourfile))
{
fin >> temp;
stack.push(temp);
}
Forum: C++ Nov 1st, 2004
Replies: 1
Views: 3,967
Posted By jasweb2002
Not a master of the language but the error might be that you are dividing by zero. Not sure how C++ handles that off the top of my head.
Forum: C++ Oct 18th, 2004
Replies: 9
Views: 4,218
Posted By jasweb2002
Boo and hiss. "Proud" Chippewa here. :-|
Showing results 1 to 40 of 56

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC