Recent content by subwaybusker

  1. 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)...
  2. 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...
  3. 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?
  4. 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...
  5. 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...
  6. 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?
  7. 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...
  8. 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.
  9. 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...
  10. 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...
  11. S

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

    I need to initialize the arrays of an object to zero, but when I compile it, it gives me gibberish. Here's my code:
  12. S

    Engineering Can Superposition Be Used with Source Transformation in Circuit Analysis?

    Is it okay to use superposition in conjuction with source transformation?
  13. S

    How to Integrate sqrt(x^2+1) Using the u-Substitution Method?

    Homework Statement integral: sqrt(x^2+1) Homework Equations The Attempt at a Solution I tried using x=tan[y], dx=sec^2[y]dy Integral: sqrt(tan^2[y]+1)sec^2[y]dy =sec^3[y]dy =(tan^2[y]+1)(sec[y])dy =(tan^2[y]sec[y]+sec[y])dy and then i was stuck.
  14. S

    Engineering Basic Circuits - Equivalent Resistance

    Homework Statement Find the Resistance between terminals B-C, B-D Homework Equations The Attempt at a Solution The book says that the 2 80-ohm resistors are in parallel for terminals A-B, and the answer for B-C=90ohms, B-D=85ohms. I don't quite understand why this is. Is it...
Back
Top