0

I'm trying to do some inheritance/polymorphism, and so I'm making a parent class.
This is in the header.

class CProtoType
{
public:
	CProtoType(){};	
	virtual ~CProtoType(){};

	virtual CString field1();
	virtual CString field2();
	virtual CString field3();
	virtual CString field4();
	virtual CString field5();
};

And this is the source:

#include "CProtoType.h"



CString CProtoType::field1()
{
	
	return("Hello World!");
}

CString CProtoType::field2()
{

	return("Field2");
}


CString CProtoType::field3()
{

	return("Field3");
}


CString CProtoType::field4()
{

	return("Field4");
}

CString CProtoType::field5()
{

	return("Field5");
}

These are part of a larger existing file, but when I try to compile the .cpp for it, I get the following error:

fatal error C1010: unexpected end of file while looking for precompiled header directive

And it ends up looking at the last bracket. Why doesn't this simple setup work?

2
Contributors
2
Replies
3
Views
12 Years
Discussion Span
Last Post by Drowzee
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.