   Fatal Error In visual studio 2008
  Hi all I try to compile a program in vs 2008 c++ and i get the following error:fatal error LNK1561: entry point must be definedbelow is the source code for my header #include <afxcmn.h>#include <math.h>#define IDC_TABLEVIEW 300#define nFIELDS 6#define N 50#define f(a,b) (pow(a,2)*cos(b)+1)class CCode4A : public CFrameWnd{protected:double *x, *y, h;CString *sx, *sy;CString *sk1, *sk2, *sk3, *sk4;public:CCode4A();~CCode4A();CListCtrl TableView;void CreateListColumns(), AddListItems(), RK4();afx_msg void OnPaint();DECLARE_MESSAGE_MAP();};class CMyWinApp : public CWinApp{public:virtual BOOL InitInstance();};The main file (.cpp) is also shown below#include "code4A.h"CMyWinApp MyApplication;BOOL CMyWinApp::InitInstance(){CCode4A* pFrame = new CCode4A;m_pMainWnd = pFrame;pFrame->ShowWindow(SW_SHOW);pFrame->UpdateWindow();return TRUE;}BEGIN_MESSAGE_MAP(CCode4A, CFrameWnd)ON_WM_PAINT()END_MESSAGE_MAP()CCode4A::CCode4A(){x=new double [N+1];y=new double [N+1];sx=new CString [N+1];sy=new CString [N+1];sk1=new CString [N+1];sk2=new CString [N+1];sk3=new CString [N+1];sk4=new CString [N+1];x[0]=0; y[0]=-1; h=0.1;Create(NULL,"Runge–Kutta Method of Order 4");TableView.Create(WS_VISIBLE | WS_CHILD | WS_BORDER | LVS_REPORT| LVS_NOSORTHEADER,CRect(30,50, 550, 400), this, IDC_TABLEVIEW);CreateListColumns();RK4();AddListItems();}CCode4A::~CCode4A(){delete x,y,sx,sy,sk1,sk2,sk3,sk4;}void CCode4A::OnPaint(){CPaintDC dc(this);dc.TextOut(30,20,"Solutions to the problem dy/dx=pow(x,2)cos(y)+1, y(0)=-1.");}void CCode4A::CreateListColumns(){char* column[nFIELDS+1]={"i","x","y","k1","k2","k3","k4"};int columnWidth[nFIELDS+1]={40,40,80,80,80,80,80};LV_COLUMN lvColumn;lvColumn.mask = LVCF_WIDTH | LVCF_TEXT | LVCF_FMT | LVCF_SUBITEM;lvColumn.fmt = LVCFMT_CENTER;lvColumn.cx = 85;for (int i=0;i<=nFIELDS;i++){lvColumn.iSubItem = 0;lvColumn.pszText = column;TableView.InsertColumn(i, &lvColumn);TableView.SetColumnWidth(i,columnWidth);}}void CCode4A::AddListItems(){CString iteration;LV_ITEM lvItem;lvItem.mask = LVIF_TEXT | LVIF_STATE;lvItem.state = 0;lvItem.stateMask = 0;for (int i=0;i<=N;i++){lvItem.iItem=i;lvItem.iSubItem = 0;lvItem.pszText = "";iteration.Format("%d",i);TableView.InsertItem(&lvItem);TableView.SetItemText(i, 0, iteration);TableView.SetItemText(i, 1, sx);TableView.SetItemText(i, 2, sy);TableView.SetItemText(i, 3, sk1);TableView.SetItemText(i, 4, sk2);TableView.SetItemText(i, 5, sk3);TableView.SetItemText(i, 6, sk4);}}void CCode4A::RK4(){int i;double k1,k2,k3,k4;for (i=0;i<N;i++){k1=h*f(x,y);k2=h*f(x+h/2,y+k1/2);k3=h*f(x+h/2,y+k2/2);k4=h*f(x+h,y+k3);y[i+1]=y+(k1+2*k2+2*k3+k4)/6;x[i+1]=x[0]+(double)(i+1)*h; // increment for x// convert the values to stringssx.Format("%.1lf",x);sy.Format("%lf",y);sk1.Format("%lf",k1);sk2.Format("%lf",k2);sk3.Format("%lf",k3);sk4.Format("%lf",k4);}}I have tried hard but I havent been able to figure out why i am receiving dat error. Ur help is really appreciated.[Edited by - ApochPiQ on June 13, 2009 9:55:07 AM]
  As the error message says - you have no entry point defined in your project. Define main or WinMain function (depending on either you are creating console or GUI program).   