R
Ravikiran
Hi,
I am trying to compile a code developed using VC6 in VC 7.1 compiler.
I get a "Internal compiler error" for what I think is a very simple
piece of code.
I tried to reproduce the problem and it is possible with the code below.
//------------------------------------
//ForwardDecl.h
//------------------------------------
class CString;
class Temp
{
public:
Temp(const CString& szStr);
};
//------------------------------------
//ForwardDecl.cpp
//------------------------------------
# include <afx.h>
# include "ForwardDecl.h"
int _tmain(int argc, _TCHAR* argv[])
{
CString szTemp;
Temp t(szTemp);
return 0;
}
It gives a ICE on line 1 of ForwardDecl.h.
Of course I can include <afx.h> in the ForwardDecl.h and get away with it.
But I don't want to unnecessarily include a header.
Is there any other solution?
Best Regards,
ravi.
PS: If you want to reply directly, pl. remove the .net from my mail address.
Sorry for the inconvenience!
I am trying to compile a code developed using VC6 in VC 7.1 compiler.
I get a "Internal compiler error" for what I think is a very simple
piece of code.
I tried to reproduce the problem and it is possible with the code below.
//------------------------------------
//ForwardDecl.h
//------------------------------------
class CString;
class Temp
{
public:
Temp(const CString& szStr);
};
//------------------------------------
//ForwardDecl.cpp
//------------------------------------
# include <afx.h>
# include "ForwardDecl.h"
int _tmain(int argc, _TCHAR* argv[])
{
CString szTemp;
Temp t(szTemp);
return 0;
}
It gives a ICE on line 1 of ForwardDecl.h.
Of course I can include <afx.h> in the ForwardDecl.h and get away with it.
But I don't want to unnecessarily include a header.
Is there any other solution?
Best Regards,
ravi.
PS: If you want to reply directly, pl. remove the .net from my mail address.
Sorry for the inconvenience!