Using Constructors -- LNK2019 error in Visual C++

M

mcarthum

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?
 
M

multyinfo

:::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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top