Using Constructors -- LNK2019 error in Visual C++

Discussion in 'C++' started by mcarthum@gmail.com, Aug 30, 2008.

  1. Guest

    I have a class declared in a header file as follows:

    class Vector3{
    public:
    int x,y,z;
    Vector3(int inx, int iny, int inz);
    };

    And I define the class in a source file:

    class Vector3{
    public:
    int x,y,z;
    Vector3(int inx, int iny, int inz){
    x = inx;
    y = iny;
    z = inz;
    }
    };

    When I #include the header in another file and try to construct a
    Vector 3 object using "Vector3 vect(x,y,z);" I get an "unresolved
    external symbol" linker error. What might be causing this?
    , Aug 30, 2008
    #1
    1. Advertising

  2. Guest

    :::WWW.MULTYINFO.COM UPDATES ::: We have just updated our website and
    added some new options such as: NEWS FROM ALL OVER THE WORLD. More
    than 157 Countries Latest News. LINK EXCHANGE and islam,business,live
    tv, play online game ,mobile and we have updated daily please vISIT
    REGULARLY Just visit at http://www.multyinfo.com
    , Aug 31, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. sheep
    Replies:
    3
    Views:
    1,253
    Jiangsheng[Microsoft MVP of VC++]
    Aug 4, 2004
  2. Morten Aune Lyrstad

    error LNK2019

    Morten Aune Lyrstad, Aug 26, 2004, in forum: C++
    Replies:
    5
    Views:
    2,010
    Morten Aune Lyrstad
    Aug 27, 2004
  3. girays
    Replies:
    1
    Views:
    659
  4. Trent
    Replies:
    9
    Views:
    611
    Trent
    Jun 29, 2007
  5. wiegmale

    Using a template getting LNK2019 error

    wiegmale, Jul 8, 2010, in forum: C Programming
    Replies:
    0
    Views:
    442
    wiegmale
    Jul 8, 2010
Loading...

Share This Page