User Profile

Collapse

Profile Sidebar

Collapse
iapetus7
iapetus7
Last Activity: Apr 6 '07, 12:08 AM
Joined: Mar 2 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • iapetus7
    replied to assignment operator trouble.
    in C
    hahaha omg that was it??? lol, i feel like such an idoit now. Thanks man. (ya it was the const thing. the * operator was defined, thought i had included it in the first post. sorry.
    See more | Go to post

    Leave a comment:


  • iapetus7
    replied to assignment operator trouble.
    in C
    ya, here is the code
    const float operator !() const
    {
    return sqrtf(X*X + Y*Y + Z*Z);
    }

    const CVector operator |(const float length) const
    {
    return *this * (length/ !(*this));
    }
    See more | Go to post

    Leave a comment:


  • iapetus7
    started a topic assignment operator trouble.
    in C

    assignment operator trouble.

    So i have this class CVector which looks a little like this

    class CVector
    {
    const CVector& operator=(const CVector& right)
    {
    X = right.X;
    Y = right.Y;
    Z = right.Z;

    return *this;
    }

    const CVector& operator |=(const float length) const
    {
    return *this = ( *this | length...
    See more | Go to post
No activity results to display
Show More
Working...