csripriya1
Programmer
Hi all,
I have a very small code, which reads in data of an object from a file and writes it back to another file.
Here is the code.
#include "class.h"
void main()
{
string ligcrd;
crd lig;
cout<<"Ligand.Crd file :"<<endl;
cin>>ligcrd;
lig.read_crd(ligcrd);
lig.print_crd("lig_out.crd"
;
cout<<"Complete"<<endl;
}
When I execute this code,this prints complete then dies out giving access violation with the debug option in Visual C++,I am getting an arrow pointing to this.
0041B4BC mov dword ptr [ecx+4],edi.
I am getting a perfect outfile with all the information.
As I have neither pointer nor an array,I am wondering why this is happening.Can anyone please help me with his.
I have a very small code, which reads in data of an object from a file and writes it back to another file.
Here is the code.
#include "class.h"
void main()
{
string ligcrd;
crd lig;
cout<<"Ligand.Crd file :"<<endl;
cin>>ligcrd;
lig.read_crd(ligcrd);
lig.print_crd("lig_out.crd"
cout<<"Complete"<<endl;
}
When I execute this code,this prints complete then dies out giving access violation with the debug option in Visual C++,I am getting an arrow pointing to this.
0041B4BC mov dword ptr [ecx+4],edi.
I am getting a perfect outfile with all the information.
As I have neither pointer nor an array,I am wondering why this is happening.Can anyone please help me with his.