Read information from Ply

Hello,
My name is ashi.
i am a beginner in C++

I am getting the following error

error LNK2019: unresolved external symbol "public: __thiscall P_Model::P_Model(void)" (??0P_Model@@QAE@XZ) referenced in function "public: void __thiscall P_Model::Load_File(char *)" (?Load_File@P_Model@@QAEXPAD@Z)

i am actually trying to read information from the ply file

and this is the simple function i am using.
the function is pretty much ok i feel but dont know what this error is about
please help if possible
here is the function


void P_Model::Load_File(char* ascii_filepath)
{


P_Model P_Triangle;
P_Model vertex;

std::ifstream fin(ascii_filepath);

int num_elements;
int num_faces;
int color_red;
int color_green;
int color_blue;
int i;
int edge_index;


if(!fin)
return;// false;

std::string pgarb = "";

// fin.getline(sentence,100) to get the wholeline

fin >> pgarb;

if (pgarb != "ply")
return ;//false;

for(i = 0; i < 8; i++)
fin >> pgarb;

fin >> num_elements;

for (i = 0 ; i < 23 ; i++)
fin>> pgarb;

fin>> num_faces;


for ( i=0; i<6; i++)
fin>> pgarb;

for(i=0; i < num_elements; i++)
{

fin >> P_Triangle.x
>> P_Triangle.y
>> P_Triangle.z
>> color_red
>> color_green
>> color_blue
>> pgarb;


if (color_red > 200 && color_green < 75 && color_blue < 75)
{
red_x.push_back(P_Triangle.x);
red_y.push_back(P_Triangle.y);
red_z.push_back(P_Triangle.z);
}

else if(color_green > 200 && color_red < 75 && color_blue < 75)
{
green_x.push_back(P_Triangle.x);
green_y.push_back(P_Triangle.y);
green_z.push_back(P_Triangle.z);
}

else if(color_blue > 200 && color_red < 75 && color_green < 75)
{
green_x.push_back(P_Triangle.x);
green_y.push_back(P_Triangle.y);
green_z.push_back(P_Triangle.z);
}

}

for (i=0 ; i < num_faces; i++)
{
fin >> edge_index;
fin >> vertex.x >> vertex.y >> vertex.z;
}

fin.close();

}




that link error basically amounts to "I don't know what or where P_Model is."

So, what is P_Model? Where is it defined? Is it some external sources that need to be included and compiled with your source code, or is it an external library that must be linked in?
Thanks
I found out the solution.

I forget to write the constructor and the destructor functions in the .cpp files

thanks
ashi
Topic archived. No new replies allowed.