Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

C1010 error

Status
Not open for further replies.

HyperEngineer

Programmer
May 8, 2002
190
0
0
US
I have a MFC project in VC++ 6. I have added the following files to the project.

AuxillaryFunctions.cpp:
Code:
// AuxillaryFunctions.cpp : Global functions for any project
//
#include "AuxillaryFunctions.h"

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

int IdleFunction()
{
	static int iCount = 0;
	MSG msg;
	while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
	{
		TranslateMessage(&msg);
		DispatchMessage(&msg);
		
	}
	return iCount++;
}

int TimeDelay(int iSeconds)
{
	time_t start, stop;
	double elapsedtime;

	time(&start);
	while(1)
	{
		time(&stop);
		elapsedtime =  difftime(stop, start);
		if (elapsedtime > iSeconds)
			break;
	}
	return 0;
}

AuxillaryFunctions.h:
Code:
// AuxillaryFunctions.h : Global functions
//

#if !defined(AUXILLARY_FUNCTIONS_INCLUDED_)
#define AUXILLARY_FUNCTIONS_INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

int IdleFunction(void);
int TimeDelay(int);

#endif // AUXILLARY_FUNCTIONS_INCLUDE_

When I build this I get the following error:

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

Any ideas?

thanks,

HyperEngineer
If it ain't broke, it probably needs improvement.
 

I found the answer. Added the following to AuxillaryFunction.cpp file:

Code:
#include "stdafx.h"



HyperEngineer
If it ain't broke, it probably needs improvement.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top