Recent content by subwaybusker

  1. S

    CompSci: Undefined reference to

    Homework Statement I'm compiling ExprTree.cpp and it's giving me an Undefined reference to 'BinaryTree::BinaryTree(std::string)', 'BinaryTree::toString()', 'BinaryTree::~BinaryTree()', and an undefined reference to '_WinMain@16' ExprTree inherits from BinaryTree Homework Equations...
  2. S

    Seg fault in Sparse Matrix Code (due in 2.5 hours)

    i just ran it using a debugger and this is what it had: #0 0x0804939e in SparseNode::getColID (this=0x0) at sparsematrix.h:130 #1 0x08048a2d in SparseMatrix::insertElement (this=0xbfe5ef10, row=1, col=2, elem=2) at sparsematrix.cpp:72 #2 0x080491f3 in main () at sparsematrix.cpp:378...
  3. S

    Comp Sci Due Tomorrow: Linked List in C++

    #include <iostream> #include "recommender.h" #include <stdio.h> #include "sparsematrix.h" using namespace std; #ifndef RECOMMENDER_H #define RECOMMENDER_H class Recommender { private: SparseMatrix* ratings; // pointer to sparse matrix containing ratings char**...
  4. S

    BIO: questions about GFP and CaM

    Homework Statement The molecule in question is GFP with CaM 1) Suggest several point mutations that will disable the protein's function without dramatically altering the protein's shape. Explain why. 2) Suggest a point mutation that will completely alter the protein's shape. Explain why...
  5. S

    Help with installing cygwin on vista

    I searched up some instructions on the web on how to install cygwin. I downloaded cygwin, 1) clicked the "install from internet" option 2) Clicked on "Just Me" and "Unix/binary" option 3) went to the packages screen, and then clicked on the options listed under KDE (since my prof uses KDE)...
  6. S

    Prove parabolas intersect at right angles (polar eq'ns)

    Homework Statement Show that the parabolas r=c/(1+cosθ)and r'=d/(1-cosθ) intersect at right angles. The Attempt at a Solution I found the points of intersection by setting the two equations equal, to which I got: cosθ = (c- d)/(c+d) θ = cos^-1[(c- d)/(c+d)] then i tried to find the...
  7. S

    Comp Sci How can I initialize 2D arrays in C++ to avoid gibberish output?

    oh, i get it now...but what am I supposed to do with bin.image?
  8. S

    Comp Sci How can I initialize 2D arrays in C++ to avoid gibberish output?

    sorry, i think i still may not get what you're saying...I'm changing the pointers of destImage so that they point to image, so how are the pointers of image changing? Right now I've changed getImage to this: but i still don't get the initializing/memory leak part...
  9. S

    Comp Sci How can I initialize 2D arrays in C++ to avoid gibberish output?

    sorry, I got the first part of what you said about the indices but I didn't get the part where you mentioned delete. ~CBin is trying to delete what Test1() already deleted..?Does that mean one of them is redundant? I am supposed to write a ~CBin function. And the delete in Test1() was given to...
  10. S

    Comp Sci How can I initialize 2D arrays in C++ to avoid gibberish output?

    could you point out what's wrong with getImage? I'm trying to copy the contents of image into destImage. And also, when I don't run getImage and run the rest of the functions, I find that image is still not properly initialized to zero. Any ideas on why that is?
  11. S

    Comp Sci How can I initialize 2D arrays in C++ to avoid gibberish output?

    This is getImage: void CBin::getImage(unsigned char** destImage) { for(int i=0;i<height*width;i++) { destImage[i] = image[i]; } } Now it's like terminating randomly. It does go through the initializing function and prints out "Image init!" and since I casted...
  12. S

    Comp Sci How can I initialize 2D arrays in C++ to avoid gibberish output?

    I don't know why either. It prints out the indices of the matrices with the blanks all the way down to "Failed Test 1" but then I get the program termination pop-up.
  13. S

    Comp Sci How can I initialize 2D arrays in C++ to avoid gibberish output?

    I don't know what getImage looks like, because it doesn't actually print out anything, but it doesn't cause a problem. I just tried running it with the getImage function and with it, there are no symbols on the screen, it just prints the indices of the matrix and has a blank. Without running the...
  14. S

    Comp Sci How can I initialize 2D arrays in C++ to avoid gibberish output?

    It's part of an assignment and the requirements are such that I cannot use vector. I mean gibberish as in symbols. I tried printing all of the values out. I even tried setting the value of image[1][1] = 0; in my code, but it wouldn't work. Here's a longer version of my code: I'm just using...
Back
Top