I am getting an unresolved external error for the program below. Any ideas on what is causing this error. I still have to write the program to test these functions.
error LNK2019: unresolved external symbol _main referenced in function _mainCRTStartup
fatal error LNK1120: 1 unresolved externals
Code:#include<iostream> #include<cmath> using namespace std; class CartesianPoint { float x,y; public: CartesianPoint(float x1,float y1) { x=x1;y=y1; } void operations() { cout<<"\n Distance from x-axis : "<<y; cout<<"\n Distance from y-axis : "<<x; float d; d=sqrt(x*x+y*y); cout<<"\n Distance from origin : "<<d; } }; class LineSegment { float x1,y1,x2,y2; float mx,my; public: LineSegment(float x11,float y11,float x12,float y12) { x1=x11;y1=y11;x2=x12;y2=y12; CartesianPoint c1(x1,y1),c2(x2,y2); c1.operations(); c2.operations(); } void midpt() { mx=(x1+x2)/2; my=(y1+y2)/2; cout<<"\n Line joining ("<<x1<<","<<y1<<") and ("<<x2<<","<<y2<<") :"; cout<<"\n The mid-point is- ("<<mx<<","<<my<<")"; } void perpbis() { float m; m=(y2-y1)/(x2-x1); m=(-1)/m; cout<<"\n Equation of perpendicular bisector is: "; cout<<"\n y-"<<my<<"="<<m<<"(x-"<<mx<<")"; } }; class Line { float m,x,y; public: Line(float m1,float x1,float y1) { m=m1;x=x1;y=y1; } void pseq() { cout<<"\n Point-Slope Equation is :"; cout<<"\n y-"<<y<<"="<<m<<"(x-"<<x<<")"; } void intercept() { cout<<" \n Intercept on x-axis: "<<x-y/m; cout<<" \n Intercept on y-axis: "<<y-m*x; } };



LinkBack URL
About LinkBacks


