Class Construction Problem
-
I'm running into a problem contstructin a class. I'm trying to inherit the CObList class. So far I just added a default constructor and a struct. Here's the code:
#ifndef FAF_H
#define FAF_H// CFAFList class declaration
class CFAFList : public CObList
{
protected:
struct FAFRecord
{
CString name;
CString address;
CString HomePhone;
CString WorkPhone;
CString CelPhone;
CString FaxNumber;
}m_FafRecord;public:
CFAFList();
};
#endifAnd here's the source code for my new class:
#include "FAFList.h"
//**************************************
// Definition of CFAFList constructor. *
//**************************************CFAFList::CFAFList()
{
m_FafRecord->name = "";
m_FafRecord->address = "";
m_FafRecord->HomePhone = "";
m_FafRecord->WorkPhone = "";
m_FafRecord->CelPhone = "";
m_FafRecord->FaxNumber = "";
}My problem is, when I try to compile this, I get
p:\findafolk\faflist.cpp(17) : fatal error C1010: unexpected end of file while looking for precompiled header directive
as an error. How do I fix this? Danny The stupidity of others amazes me! -
I'm running into a problem contstructin a class. I'm trying to inherit the CObList class. So far I just added a default constructor and a struct. Here's the code:
#ifndef FAF_H
#define FAF_H// CFAFList class declaration
class CFAFList : public CObList
{
protected:
struct FAFRecord
{
CString name;
CString address;
CString HomePhone;
CString WorkPhone;
CString CelPhone;
CString FaxNumber;
}m_FafRecord;public:
CFAFList();
};
#endifAnd here's the source code for my new class:
#include "FAFList.h"
//**************************************
// Definition of CFAFList constructor. *
//**************************************CFAFList::CFAFList()
{
m_FafRecord->name = "";
m_FafRecord->address = "";
m_FafRecord->HomePhone = "";
m_FafRecord->WorkPhone = "";
m_FafRecord->CelPhone = "";
m_FafRecord->FaxNumber = "";
}My problem is, when I try to compile this, I get
p:\findafolk\faflist.cpp(17) : fatal error C1010: unexpected end of file while looking for precompiled header directive
as an error. How do I fix this? Danny The stupidity of others amazes me! -
I'm running into a problem contstructin a class. I'm trying to inherit the CObList class. So far I just added a default constructor and a struct. Here's the code:
#ifndef FAF_H
#define FAF_H// CFAFList class declaration
class CFAFList : public CObList
{
protected:
struct FAFRecord
{
CString name;
CString address;
CString HomePhone;
CString WorkPhone;
CString CelPhone;
CString FaxNumber;
}m_FafRecord;public:
CFAFList();
};
#endifAnd here's the source code for my new class:
#include "FAFList.h"
//**************************************
// Definition of CFAFList constructor. *
//**************************************CFAFList::CFAFList()
{
m_FafRecord->name = "";
m_FafRecord->address = "";
m_FafRecord->HomePhone = "";
m_FafRecord->WorkPhone = "";
m_FafRecord->CelPhone = "";
m_FafRecord->FaxNumber = "";
}My problem is, when I try to compile this, I get
p:\findafolk\faflist.cpp(17) : fatal error C1010: unexpected end of file while looking for precompiled header directive
as an error. How do I fix this? Danny The stupidity of others amazes me!Remove the
#include "stdafx.h"
line at the top of your faflist.cpp file -- modified at 10:54 Monday 17th October, 2005 Mmmhh, sorry :~ . It was adding the file not remove it ;P. A second solution is to specify that this file don't use precompiled headers. -
Remove the
#include "stdafx.h"
line at the top of your faflist.cpp file -- modified at 10:54 Monday 17th October, 2005 Mmmhh, sorry :~ . It was adding the file not remove it ;P. A second solution is to specify that this file don't use precompiled headers.