Sorry to bother you all, but I have a small problem in a large amount of code. All I can say is I think it's a bracket problem. Well, here's the code and the problem (reverse that).

--------------------Configuration: Password - Win32 Debug--------------------
Compiling...
PasswordDlg.cpp
C:\Program Files\Microsoft Visual Studio\MyProjects\Password\PasswordDlg.cpp(220) : error C2601: 'OnStaticPassword' : local function definitions are illegal
C:\Program Files\Microsoft Visual Studio\MyProjects\Password\PasswordDlg.cpp(226) : error C2601: 'OnBypass' : local function definitions are illegal
C:\Program Files\Microsoft Visual Studio\MyProjects\Password\PasswordDlg.cpp(251) : error C2601: 'OnSelchangeTab' : local function definitions are illegal
C:\Program Files\Microsoft Visual Studio\MyProjects\Password\PasswordDlg.cpp(259) : error C2601: 'OnOK' : local function definitions are illegal
C:\Program Files\Microsoft Visual Studio\MyProjects\Password\PasswordDlg.cpp(275) : fatal error C1004: unexpected end of file found
Error executing cl.exe.

Password.exe - 5 error(s), 0 warning(s)


// PasswordDlg.cpp : implementation file
//

#include "stdafx.h"
#include "Password.h"
#include "PasswordDlg.h"
#include <string.h>
#include <fstream.h>

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CAboutDlg dialog used for App About
// global variables{
int count;
//}

class CAboutDlg : public CDialog
{
public:

CAboutDlg();

// Dialog Data
//{{AFX_DATA(CAboutDlg)
enum { IDD = IDD_ABOUTBOX };
//}}AFX_DATA

// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CAboutDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL

// Implementation
protected:
//{{AFX_MSG(CAboutDlg)
virtual void OnOK();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};

CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
{
//{{AFX_DATA_INIT(CAboutDlg)
//}}AFX_DATA_INIT

}

void CAboutDlg:oDataExchange(CDataExchange* pDX)
{
CDialog:oDataExchange(pDX);
//{{AFX_DATA_MAP(CAboutDlg)
//}}AFX_DATA_MAP
}

BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
//{{AFX_MSG_MAP(CAboutDlg)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CPasswordDlg dialog

CPasswordDlg::CPasswordDlg(CWnd* pParent /*=NULL*/)
: CDialog(CPasswordDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CPasswordDlg)
m_PASSWORD = _T("");
//}}AFX_DATA_INIT
// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}

void CPasswordDlg:oDataExchange(CDataExchange* pDX)
{
CDialog:oDataExchange(pDX);
//{{AFX_DATA_MAP(CPasswordDlg)
DDX_Text(pDX, IDC_EDIT1, m_PASSWORD);
DDV_MaxChars(pDX, m_PASSWORD, 15);
//}}AFX_DATA_MAP
}

BEGIN_MESSAGE_MAP(CPasswordDlg, CDialog)
//{{AFX_MSG_MAP(CPasswordDlg)
ON_WM_SYSCOMMAND()
ON_WM_PAINT()
ON_WM_QUERYDRAGICON()
ON_BN_CLICKED(IDC_STATIC1, OnStaticPassword)
ON_BN_CLICKED(IDBYPASS, OnBypass)
ON_NOTIFY(TCN_SELCHANGE, IDC_TAB, OnSelchangeTab)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CPasswordDlg message handlers

BOOL CPasswordDlg::OnInitDialog()
{
CDialog::OnInitDialog();

// Add "About..." menu item to system menu.

// IDM_ABOUTBOX must be in the system command range.
ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
ASSERT(IDM_ABOUTBOX < 0xF000);

CMenu* pSysMenu = GetSystemMenu(FALSE);
if (pSysMenu != NULL)
{
CString strAboutMenu;
strAboutMenu.LoadString(IDS_ABOUTBOX);
if (!strAboutMenu.IsEmpty())
{
pSysMenu->AppendMenu(MF_SEPARATOR);
pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
}
}

// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon

// TODO: Add extra initialization here

return TRUE; // return TRUE unless you set the focus to a control
}

void CPasswordDlg::OnSysCommand(UINT nID, LPARAM lParam)
{
if ((nID & 0xFFF0) == IDM_ABOUTBOX)
{
CAboutDlg dlgAbout;
dlgAbout.DoModal();
}
else
{
CDialog::OnSysCommand(nID, lParam);
}
}

// If you add a minimize button to your dialog, you will need the code below
// to draw the icon. For MFC applications using the document/view model,
// this is automatically done for you by the framework.

void CPasswordDlg::OnPaint()
{
if (IsIconic())
{
CPaintDC dc(this); // device context for painting

SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);

// Center icon in client rectangle
int cxIcon = GetSystemMetrics(SM_CXICON);
int cyIcon = GetSystemMetrics(SM_CYICON);
CRect rect;
GetClientRect(&rect);
int x = (rect.Width() - cxIcon + 1) / 2;
int y = (rect.Height() - cyIcon + 1) / 2;

// Draw the icon
dc.DrawIcon(x, y, m_hIcon);
}
else
{
CDialog::OnPaint();
}
}

// The system calls this to obtain the cursor to display while the user drags
// the minimized window.
HCURSOR CPasswordDlg::OnQueryDragIcon()
{
return (HCURSOR) m_hIcon;
}

void CPasswordDlg::OnCancel()
{
// TODO: Add extra cleanup here


}

void CPasswordDlg::OnOK()
{
char buffer[50];
UINT nPreviousState;

UpdateData();
ifstream FileReader("C:\\Program Files\\Microsoft Visual Studio\\MyProjects\\Password\\password.psw", ios::nocreate);
FileReader>>buffer;
if(m_PASSWORD.IsEmpty() == TRUE)
{
MessageBox("You haven't entered a password yet!");
}
else
{
if (!strcmp(m_PASSWORD,buffer))
{
MessageBox("PASSWORD ACCEPTED, DAVID","ACCEPTANCE");
// Re-Enable them... (NOTE: if you don't re-enable them they will stay
// dis-abled after the program dies...
SystemParametersInfo (SPI_SETSCREENSAVERRUNNING, FALSE, &nPreviousState, 0);
CDialog::OnOK();
}
else
{
MessageBox("Incorrect","Incorrect");

}
}

void CPasswordDlg::OnStaticPassword()
{
// TODO: Add your control notification handler code here

}

void CPasswordDlg::OnBypass()
{
UINT nPreviousState;
char string[3];
ifstream FileReader("C:\\Program Files\\Microsoft Visual Studio\\MyProjects\\Password\\bypass.psw", ios::nocreate);
FileReader>>string;
if (!strcmpi(string,"yes"))
{
MessageBox("Bypass switch on","Bypassed");
// Re-Enable them... (NOTE: if you don't re-enable them they will stay
// dis-abled after the program dies...
SystemParametersInfo (SPI_SETSCREENSAVERRUNNING, FALSE, &nPreviousState, 0);
CDialog::OnOK();
}
else if (!strcmpi(string,"no"))
{
MessageBox("Bypass switch set to off","No Access");
}
else
{
MessageBox("Could not find bypass switch","NO-CAN-DO");
}

}

void CPasswordDlg::OnSelchangeTab(NMHDR* pNMHDR, LRESULT* pResult)
{
// TODO: Add your control notification handler code here
// TODO: Add overall tab coding. Check your C++ book for code.

*pResult = 0;
}

void CAboutDlg::OnOK()
{
int *counter = new int;
counter = &count;
if (*counter < 0)
{
counter = 0;
}
count++;
if (*counter > 2)
{
CString str;
str.Format("Why are you looking at this so many times? You've looked at it %d times already!",count);
MessageBox(str);
}
CDialog::OnOK();
}