- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hello
I have an old program that I'm trying to port from MS Visual C++ v6.0 to Intel C++ v11.1.048
And being a newbie I'm having a few problems.
Specifically - the old code references a fstream.h - which is not found. It appears that this may be a microsoft thing, as I can't find it with the Intel copmpiler. Presumably there is an equivalent?
Also I'm getting a large number of "error: ConstructElements is not a template" and "error: DestructElements is not a template" messages when comopiling the .h files
I would include an example of the code - but my posts just crash if I do - I'll try attaching an instead...
What is the best way around these issues?
Any help in getting the code to compile would be gratefully recieved.
Thankx
Jim
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Intel C++ should inherit from the base C++ installation (the VC++ 7.1, 8, or 9 you had to install prior to ICL). As pre-dated standardization from fstream.h to fstream, you probably need to make the change and see how far it takes you.
.h (header) files can't be compiled, unless to .pch (pre-compiled header). If you have trouble, someone may be able to help if you will attach a complete example, including the C++ source code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As far as the header is concerned, the name of the header in the C++standard is fstream not fstream.h.
So you need to change fstream.h to fstream and also put :
using namespace std;
After the#includesince all the names are going to be in namespace std.
The errors about ConstructElements and DestructElements occur because you have specializations declared in the IMAGINFO.H header, i.e.:
template void AFXAPI ConstructElements (CImageInfo** pElements,
int nCount);
The template syntax says I am declaring a specialization for this template function. In order for that to be valid you need to have declared a non-specialized ConstructElements template function previously.
If you preprocess the whole source file (i.e. use -P or -E) and attach that may be we can tell you more. Is there a declaration of ConstructElements in some other header that is included before this header?
Judy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
>So you need to change fstream.h to fstream and also put :
>using namespace std;
>After the#includesince all the names are going to be in namespace std.
Thankx
Found I also needed to include
to find some of the classes declared differently
:)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page