1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

boost librarys' classes

Discussion in 'C' started by Andat, Apr 17, 2011.

  1. Andat

    Andat New Member

    Joined:
    Apr 17, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    I am trying to run a project that uses a boost library class called matrix in another custom class. In the custom class there is a Rotate method that takes a reference to matrix object as a constant argument. When I try to run the project I get an error meassage
    "error C4430: missing type specifier - int assumed. Note: C++ does not support default-int"
    "error C2143: syntax error : missing ',' before '&' "
    " error C2146: syntax error : missing ';' before identifier 'v' "
    " error C3861: 'v': identifier not found "

    Can any one help me what the problem could be. Below is the line that generates the error. I am trying to run the project in Microsoft Visual C++ 2008. The boost version is 1_32_0. Do I need to configure Boost first?

    class Space {

    public:
    .
    .
    .

    void Rotate( const Matrix& matx )

    {

    Matrix v(3,1);
    v.Row(1) << x();
    v.Row(2) << y();
    v.Row(3) << z();
    v = matx*v;
    setX( v(1,1) );
    setY( v(2,1) );
    setZ( v(3,1) );
    }
     

Share This Page