These are my errors:
line, error, default order, which file the error is in
16 error C2061: syntax error : identifier 'ifstream' 1 heap.h
07 error C2061: syntax error : identifier 'ifstream' 2 heap.cpp
35 error C2061: syntax error : identifier 'ifstream' 3 chunkList.h
21 error C2061: syntax error : identifier 'ifstream' 4 chunkList.cpp
35 error C2061: syntax error : identifier 'ifstream' 5 chunkList.h
16 error C2061: syntax error : identifier 'ifstream' 6 heap.h
You can see that it's hitting two lines twice.
I tried similar coding on a normal function, and didn't get any errors, so it's only happening inside my class constructor (I have two classes, but they use the same heading):
1 2 3 4 5
|
template <class TYPE>
heap <TYPE> ::heap(ifstream& fin, int NumOfNums)
{
...
}
| |
I already #included fstream and my classes's header file in the driver.cpp file.
I'm using Visual Studio 9.