|
-
September 17th, 1999, 09:17 AM
#1
Why ????
I wrote 2 files, "Extra.h" and "Extra.cpp"
Why the compiler said:
c:\my documents\receipt\extra.cpp(21) : fatal error C1010: unexpected end of file while looking for precompiled header directive
here is the code of extra.cpp
// implementation of extra functions
/////////////////////////////////////
// change to real date value
void ToReal(int &nDay,int &nMonth,int &nYear)
{
nDay=nDay+1;
nMonth=nMonth+1;
nYear=nYear+1999;
}
// change to combo box value
void ToFake(int &nDay,int &nMonth,int &nYear)
{
nDay=nDay-1;
nMonth=nMonth-1;
nYear=nYear-1999;
}
Here is the header file Extra.h
// this file to contain prototype for extra functions
///////////////////////////////////////////////////
// change value of m_nDay, m_nMonth and m_nYear back and forth
//change to real value of date
void ToReal(int &nDay,int &nMonth,int &nYear);
// change to combo box value
void ToFake(int &nDay,int &nMonth, int &nYear);
Thanks
-
September 17th, 1999, 09:24 AM
#2
Re: Why ????
In the header file put the word "extern" in front of the declarations and let me know if that works.
-
September 17th, 1999, 09:31 AM
#3
Re: Why ????
In the .cpp file, before including Extra.h, you need to include stdafx.h.
#include "stdafx.h"
#include "Extra.h"
-
September 17th, 1999, 09:42 AM
#4
Re: Why ????
nordyj is right, I just assumed you did that.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|