Search:

Type: Posts; User: Nadril

Search: Search took 0.03 seconds.

  1. Replies
    17
    Views
    2,638

    I just reverted to the old header file, and...

    I just reverted to the old header file, and decided to take a screenshot to possibly clear it up:

    http://img90.imageshack.us/img90/9528/lab2imageja3.png

    Hopefully this helps.

    And sorry, when...
  2. Replies
    17
    Views
    2,638

    It does. It is supposed to compute the value and...

    It does. It is supposed to compute the value and return it.



    With the way it was set up the instructor was initializing those variables locally (yIntercept and slope) so I only put them in the...
  3. Replies
    17
    Views
    2,638

    It's just supposed to get the value of the...

    It's just supposed to get the value of the yIntercept for the points and slope you entered earlier.



    For the most part I do, yes.




    constructor is whats in .h if I'm not mistaken (where...
  4. Replies
    17
    Views
    2,638

    Well when I take out float yIntercept; in...

    Well when I take out float yIntercept; in getIntercept() it didn't actually do anything. If I take it out of the header file than it gives me an error.

    Sorry if I'm not really grasping what you're...
  5. Replies
    17
    Views
    2,638

    segment.h class Segment { private: float...

    segment.h

    class Segment
    {
    private:
    float X1;
    float Y1;
    float X2;
    float Y2;
    float slope;
  6. Replies
    17
    Views
    2,638

    Just updated the main post. I no longer get any...

    Just updated the main post. I no longer get any errors but it is giving me a bad value for y Intercept.
  7. Replies
    17
    Views
    2,638

    Actually I believe I just got it. Only problem...

    Actually I believe I just got it. Only problem now is a bit of a logic issue (getting the wrong number for yIntercept) but I don't think that will be difficult.

    Thanks for the help.


    edit:...
  8. Replies
    17
    Views
    2,638

    Very stupid question, but how would I go along...

    Very stupid question, but how would I go along making it a member variable?

    The thing that is bugging me is that X1,X2,Y1,Y2 are all working fine for other parts of the program but slope or...
  9. Replies
    17
    Views
    2,638

    Need some logic help (another problem)

    Hi everyone. I'm currently trying to learn programming (taking a class for it) but am stuck on why this isn't working. I'm sure its something stupid. This is the program in question:

    main.cpp:
    ...
Results 1 to 9 of 9